-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
Prompt the user on a manifest version mismatch #3775
base: master
Are you sure you want to change the base?
Conversation
The bug you're seeing is because of the hint tab completion populating packages to tab complete by reading the manifest. Note that adding just a warning at a similar code level stalled because it might be too annoying #3024 Maybe this is more acceptable given it is actionable now we have |
To handle the tab completion hint issue, maybe suppress the error if it's coming from the completion handler and prevent the manifest being read so that it's read in during the next actual prompt execution, at which point an interactive prompt makes more sense IMO. |
Didn't some version of that end up making it's way in? I get that warning from time to time, e.g.: $ julia-1.10 --project=TSc1D
┌ Warning: The active manifest file has dependencies that were resolved with a different julia version (1.7.2). Unexpected behavior may occur.
└ @ ~/TSc1D/Manifest.toml:0 julia> VERSION
v"1.10.0" |
I am personally not a big fan of:
|
Understandable. Have you got your own thoughts on how the situation with mis-matched Manifests could be improved? Or is it just those two points you have quibbles with?
I thought this might be nice, but I don't mind getting rid of it at all.
The interactive ask is gated behind |
My point is that Also, how does it make sense to query this on Doing this in the manifest constructor is also not feasible since this is called in an API fashion in various places (and other packages) where the version the manifest is resolved in and the current julia version is irrelevant, |
I think I think especially now in the days where we're transitioning from old code that didn't properly declare stdlib dependancies to new code that does declare those dependencies (or code where which sub-artifacts get installed depends on the version), I'm running into errors much more often from trying to activate |
#3024 proposed adding the warning to So if your intention is to avoid nasty errors, they won't be avoided before a |
Currently when the current project's Manifest's
julia_version
doesn't match the current Julia version, Pkg either:This PR adds a check that results in a prompt when the versions differ, offering three possible courses of action:
(Julia)Manifest-v{major}.{minor}.toml
and regenerating the manifest (corresponding to Add preference for version named manifest files julia#43845)The default behaviour can be set via the new environment variable
JULIA_PKG_MANIFEST_MISMATCH_ACTION
This PR was prompted by this Zulip gripe thread: https://julialang.zulipchat.com/#narrow/stream/225540-gripes/topic/Manifests.20annoyances