Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Julia 1.9 pkgimages disabled by default #82

Open
fonsp opened this issue Apr 11, 2023 · 2 comments
Open

Julia 1.9 pkgimages disabled by default #82

fonsp opened this issue Apr 11, 2023 · 2 comments

Comments

@fonsp
Copy link
Contributor

fonsp commented Apr 11, 2023

Hi all!

I found out that julia-runtest disables Julia's pkgimages feature by default on Julia 1.9. You can test this by adding @test Base.JLOptions().use_pkgimages == 1 to one of your tests.

I think this because of this logic in Julia:

https://github.com/JuliaLang/julia/blob/8fbef6e3fc7b3b8a95dc44d0a0181d967219ddd5/src/jloptions.c#L824-L830

And in julia-runtest, we enable the --code-coverage flag by default.

I think this is actually a good default: disabling pkgimages is faster if you only run an environment once after compilation (The increase in precompilation time caused by generating the .so files is generally higher than the decrease in import Example.) This is the case for running tests once, and then discarding the worker, so it's good! This might change in a future Julia release, and enabling pkgimages might be the faster option for a one-off run. 🤞

Just wanted to share this discovery! It might be nice to document this, and/or to make this a flag that people can set.

@SaschaMann
Copy link
Member

That's interesting, thanks for pointing this out!

It might be nice to document this, and/or to make this a flag that people can set.

I'm not sure what the option should look like and if it wouldn't be best to go with a sensible default. If the behaviour for one-off runs changes, we might want to default to that being enabled unless other inputs, such as coverage-generation, take precedence.

But it should definitely be documented with the same info that you posted here!

@IanButterworth
Copy link
Member

Note that 1.11 will use pkgimages when coverage is enabled, but will regenerate the native code for tracked packages with the required coverage tracking mechanics JuliaLang/julia#52123

Should make CI faster

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

No branches or pull requests

3 participants