-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
precompilepkgs: respect loaded dependencies when precompiling for load #56901
precompilepkgs: respect loaded dependencies when precompiling for load #56901
Conversation
56b416b
to
2066d21
Compare
@@ -1158,7 +1160,7 @@ function precompile_pkgs_maybe_cachefile_lock(f, io::IO, print_lock::ReentrantLo | |||
# wait until the lock is available | |||
@invokelatest Base.mkpidlock_hook(() -> begin | |||
# double-check in case the other process crashed or the lock expired | |||
if Base.isprecompiled(pkg; ignore_loaded=true, flags=cacheflags) # don't use caches for this as the env state will have changed | |||
if Base.isprecompiled(pkg; ignore_loaded, flags=cacheflags) # don't use caches for this as the env state will have changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't recall a reason for this to be forced false. I'm assuming it was just missed.
staledeps = stale_cachefile(sourcepath, path_to_try, ignore_loaded = true, requested_flags=flags) | ||
staledeps = stale_cachefile(sourcepath, path_to_try; ignore_loaded, requested_flags=flags) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC, this was to allow the user to compute the best pkg to load for compilecache_path
, even if it is currently loaded at a different version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe it was just missed originally? c24136d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it could've been. It's not mentioned in the PR #50218
65009dc
to
9a10434
Compare
With this
Pkg.precompile
still precompiles for a clean session with the existing warning about different loaded versions, but now load-time precompilation precompiles for the current session respecting the loaded versions of deps.So the old style precompilation is avoided at load-time now.
However, there's still no warning at load time about the wrong dep version being used, but at least it's clearer at install-time now.