-
-
Notifications
You must be signed in to change notification settings - Fork 260
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
Precompilation: Fix recognizing when new versions of already loaded packages are already precompiled #2753
Merged
IanButterworth
merged 1 commit into
JuliaLang:master
from
IanButterworth:ib/precomp_loaded_module_stale_fix
Oct 9, 2021
Merged
Precompilation: Fix recognizing when new versions of already loaded packages are already precompiled #2753
IanButterworth
merged 1 commit into
JuliaLang:master
from
IanButterworth:ib/precomp_loaded_module_stale_fix
Oct 9, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment has been minimized.
This comment has been minimized.
This is now working (pushed an update to the julia branch) Master(@v1.8) pkg> activate --temp
Activating new project at `/var/folders/_6/1yf6sj0950vcg4t91m9ltb5w0000gn/T/jl_JD7jtW`
(jl_JD7jtW) pkg> add CSV
Updating registry at `~/.julia/registries/General.toml`
Resolving package versions...
Updating `/private/var/folders/_6/1yf6sj0950vcg4t91m9ltb5w0000gn/T/jl_JD7jtW/Project.toml`
[336ed68f] + CSV v0.9.6
Updating `/private/var/folders/_6/1yf6sj0950vcg4t91m9ltb5w0000gn/T/jl_JD7jtW/Manifest.toml`
[336ed68f] + CSV v0.9.6
[944b1d66] + CodecZlib v0.7.0
[9a962f9c] + DataAPI v1.9.0
[e2d170a0] + DataValueInterfaces v1.0.0
[48062228] + FilePathsBase v0.9.12
...
Precompiling project...
18 dependencies successfully precompiled in 12 seconds
julia> using CSV
(jl_JD7jtW) pkg> st --manifest FilePathsBase
Status `/private/var/folders/_6/1yf6sj0950vcg4t91m9ltb5w0000gn/T/jl_JD7jtW/Manifest.toml`
[48062228] FilePathsBase v0.9.12
(jl_JD7jtW) pkg> add FilePathsBase@0.9.11
Resolving package versions...
Updating `/private/var/folders/_6/1yf6sj0950vcg4t91m9ltb5w0000gn/T/jl_JD7jtW/Project.toml`
[48062228] + FilePathsBase v0.9.11
Updating `/private/var/folders/_6/1yf6sj0950vcg4t91m9ltb5w0000gn/T/jl_JD7jtW/Manifest.toml`
[48062228] ↓ FilePathsBase v0.9.12 ⇒ v0.9.11
Precompiling project...
✓ FilePathsBase
✓ CSV
2 dependencies successfully precompiled in 8 seconds (16 already precompiled)
2 dependencies precompiled but different versions are currently loaded. Restart julia to access the new versions
(jl_JD7jtW) pkg> precompile
Precompiling project...
✓ CSV
1 dependency successfully precompiled in 6 seconds (17 already precompiled)
1 dependency precompiled but a different version is currently loaded. Restart julia to access the new version
(jl_JD7jtW) pkg> precompile
Precompiling project...
✓ CSV
1 dependency successfully precompiled in 6 seconds (17 already precompiled)
1 dependency precompiled but a different version is currently loaded. Restart julia to access the new version This PRjulia> import Pkg
[ Info: Precompiling Pkg [44cfe95a-1eb2-52ea-b672-e2afdf69b79f]
(Pkg) pkg> activate --temp
Activating new project at `/var/folders/_6/1yf6sj0950vcg4t91m9ltb5w0000gn/T/jl_wqj0rN`
(jl_wqj0rN) pkg> add CSV
Updating registry at `~/.julia/registries/General.toml`
Resolving package versions...
Updating `/private/var/folders/_6/1yf6sj0950vcg4t91m9ltb5w0000gn/T/jl_wqj0rN/Project.toml`
[336ed68f] + CSV v0.9.6
Updating `/private/var/folders/_6/1yf6sj0950vcg4t91m9ltb5w0000gn/T/jl_wqj0rN/Manifest.toml`
[336ed68f] + CSV v0.9.6
[944b1d66] + CodecZlib v0.7.0
[9a962f9c] + DataAPI v1.9.0
[e2d170a0] + DataValueInterfaces v1.0.0
[48062228] + FilePathsBase v0.9.12
...
Precompiling project...
18 dependencies successfully precompiled in 13 seconds
julia> using CSV
(jl_wqj0rN) pkg> add FilePathsBase@0.9.11
Resolving package versions...
Updating `/private/var/folders/_6/1yf6sj0950vcg4t91m9ltb5w0000gn/T/jl_wqj0rN/Project.toml`
[48062228] + FilePathsBase v0.9.11
Updating `/private/var/folders/_6/1yf6sj0950vcg4t91m9ltb5w0000gn/T/jl_wqj0rN/Manifest.toml`
[48062228] ↓ FilePathsBase v0.9.12 ⇒ v0.9.11
Precompiling project...
✓ FilePathsBase
✓ CSV
2 dependencies successfully precompiled in 8 seconds (16 already precompiled)
2 dependencies precompiled but different versions are currently loaded. Restart julia to access the new versions
(jl_wqj0rN) pkg> precompile
(jl_wqj0rN) pkg> precompile
|
@kleinschmidt does the above behavior look right to you? |
IanButterworth
added
backport 1.6
Change should be backported to release-1.6
backport 1.7
Change should be backported to release-1.7
labels
Oct 9, 2021
JuliaLang/julia#42545 has merged and hit nightly, and tests pass now, so should be good |
Backported to 1.6 in #2843 AFAICT. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue
A MWE should be easy for this issue that @kleinschmidt posted on slack
i.e. The specific Makie version was already in the Manifest where no changes were needed, however precompilation still did work.
I've also seen this in the wild.
Fix
I believe this PR should be the fix, but I've not tested it yet
This disables the
Base.stale_cachefile
loaded module shortcut during stale cache checksDepends on https://github.com/IanButterworth/julia/tree/ib/stale_cachefile_ignore_loaded
Basically
Base.stale_cachefile
was shortcutting the stale check if the package was loaded already because there used to be no reason to do anything else, so once users see those yellow check marks, they keep seeing them any timePkg.precompile
is called, until restarting the session.