Skip to content

Add distro resources / handle files correctly in 22-image.raku#113

Merged
finanalyst merged 8 commits intofinanalyst:masterfrom
ab5tract:add-distro-resources
Jul 13, 2025
Merged

Add distro resources / handle files correctly in 22-image.raku#113
finanalyst merged 8 commits intofinanalyst:masterfrom
ab5tract:add-distro-resources

Conversation

@ab5tract
Copy link
Contributor

@ab5tract ab5tract commented Jul 10, 2025

Some relevant commit messages:

Add GTK::Simple::Image

This requires a few new GDK related subs. I have placed them within
GTK::Simple::Raw instead of GTK::Simple::GDK because otherwise
we would need to import the latter into the former. Since these
new routines are only used by GTK::Simple::Image, it seems fine
to group them in Raw where they are imported via the :image import
set.

and

Add a resource and a way to access it

In order to have a correct example for the new `GTK::Simple::Image`,
we need to use the `%?RESOURCES` of the `GTK::Simple` distribution.

This is exposed via:

  GTK::Simple::Distro::Resources::gtk-simple-resources

This is declared as a term so that once imported,
you can access the returned hash easily:

  gtk-simple-resources<camelia-logo.png>.slurp(:bin, :close)

This will hopefully be useful for users to some degree, but it
is primarily added for examples to access.

ab5tract added 4 commits May 1, 2025 18:46
This requires a few new GDK related subs. I have placed them within
GTK::Simple::Raw instead of GTK::Simple::GDK because otherwise
we would need to import the latter into the former. Since these
new routines are only used by GTK::Simple::Image, it seems fine
to group them in Raw where they are imported via the :image import
set.
In order to have a correct example for the new `GTK::Simple::Image`,
we need to use the `%?RESOURCES` of the `GTK::Simple` distribution.

This is exposed via:

  GTK::Simple::Distro::Resources::gtk-simple-resources

This is declared as a term so that once imported,
you can access the returned hash easily:

  gtk-simple-resources<camelia-logo.png>.slurp(:bin, :close)

This will hopefully be useful for users to some degree, but it
is primarily added for examples to access.
META6.json Outdated
"finanalyst aka Richard Hainsworth"
],
"auth": "zef:finanalyst",
"depends": [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels this should somehow be conditional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point.

@finanalyst
Copy link
Owner

@ab5tract Any idea why the checks are failing?
It seems to have been a pull request on ubuntu that failed. I re-started the test to see if it was just a internet glitch

I think may be we should do the test with a pre-compiled docker image.

@dwarring
Copy link
Contributor

Maybe try an apt update before the apt-get ...?

@finanalyst
Copy link
Owner

@dwarring I've added sudo apt update step to the github actions

@finanalyst
Copy link
Owner

@ab5tract I tried re-running the test, but its not using the new work flow file.
Would you add a minor commit to the PR, such as bump the version number. That should trigger a new test run.

@finanalyst
Copy link
Owner

@ab5tract one of the tests failed [/t/02-export-subs.rakutest]
Is it failing for you locally?

@finanalyst
Copy link
Owner

@ab5tract The automatic testing fails on t/02-export-subs.rakutest when run with github actions.
I have found that CI testing can sometimes fail even though on my machine the test does not fail.
So I asked earlier whether t/02-... passes locally for you.

@finanalyst
Copy link
Owner

@ab5tract t/02-export-subs.rakutest is still failing on the CI

@ab5tract
Copy link
Contributor Author

@finanalyst i am aware. What's the purpose of pinging like this?

@finanalyst
Copy link
Owner

@ab5tract sorry! I didnt think you had heard me.

@ab5tract
Copy link
Contributor Author

That's alright. I need to try this on Linux to determine if it actually passes locally or not.

@finanalyst
Copy link
Owner

@ab5tract I just re-read issue #112 and your response. Is the test failure here due to the same reason as the failures in #112? I haven't analysed the problem yet.

If the failures are independent of the work in this PR, then I can merge this PR, and then we could have a separate PR to handle the example failures

Your thoughts?

@finanalyst finanalyst merged commit ca5e17c into finanalyst:master Jul 13, 2025
1 check passed
@finanalyst
Copy link
Owner

@ab5tract Fab!

@ab5tract
Copy link
Contributor Author

This is one time at least that it's very handy that you can pass unused named arguments to methods :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants