add option to compilecache
so that Pkg precompilation can not skip different versions of loaded modules
#40345
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Paired with JuliaLang/Pkg.jl#2484
If I understand correctly, classical code-load precompilation skips precompiling different versions of loaded packages to save time, given they won't be loadable in the current session.
For the new pkg precompilation process this seems less critical.
The
compilecache
option added in this PR, along with JuliaLang/Pkg.jl#2484 allows Pkg precompilation to precompile the different version of loaded packages, but warn the user that the package is loaded so the new version won't be accessible until after a session restart.This avoids the
?
state in pkg precompilation that delayed precompilation until after session restart, which means the remaining precompilation was likely to happen at slower code-load as the user has to remember to go back to pkg mode and precompile.The new behavior does all the precompilation in the current session, but reports as yellow
✓
's, with an explanation that a restart is needed to access the new versions.More details in JuliaLang/Pkg.jl#2484