Description
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:
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.