-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
New manifest: Set julia_version
during resolve only, and warn if instantiating a manifest that was resolved in a different or unknown julia version
#2620
Conversation
That makes sense to me. |
Yeah I think this makes sense. |
Doing the warning on |
Updated to just check major.minor
AFAICT (github gripe.. it would be nice to reply to your messages as threads..) |
93a1d58
to
a4135cc
Compare
Hmmm. What are our alternatives here? We could do nothing on |
If the weird problems are only happening during precompilation, then the warning could be added to But I think problems also occur during package load and regular usage.. so I think it does need to happen immediately after Perhaps in this PR we could add it to |
db56ed8
to
7712db0
Compare
If this goes ahead, I think it should be backported to both 1.7 and 1.6. |
julia_version
during resolve only, and warn if instantiating a manifest that was resolved in a different julia versionjulia_version
during resolve only, and warn if instantiating a manifest that was resolved in a different or unknown julia version
@KristofferC at a minimum I think we should get the first commit here into 1.6.2 and the first 1.7 beta to fix #2621 |
This doesn't really make sense to me. Why would you warn when you are resolving? At that point you are already doing the right thing (resolving on the new Julia version), or? |
I'm not suggesting warning when you resolve. Instantiating doesn't re-resolve, right? That's the time you expect the install to be repeatable, so seems like a good time to warn |
My bad, I totally misread that. Yes, doing it during instantiate makes sense. 👍 |
src/Types.jl
Outdated
@@ -337,6 +337,8 @@ function EnvCache(env::Union{Nothing,String}=nothing) | |||
write_env_usage(manifest_file, "manifest_usage.toml") | |||
manifest = read_manifest(manifest_file) | |||
|
|||
Types.check_warn_manifest_julia_version_compat(manifest, manifest_file) |
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 think this one should be here. This will trigger even when doing "API" style use (like in Pluto).
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 removed this.
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.
Ok so this PR now only warns during instantiate. It's obviously better than before, but not sure how many manifest compat issues it will catch given instantiate isn't that common, I believe
7712db0
to
b710f8c
Compare
b710f8c
to
91af68a
Compare
I just want to say that we should be quite careful with adding warnings. Warning spam can be a bit annoying and a warning should (in my opinion) pretty much only be printed when there is a direct immediate action you should take as a response to fix the warning. I'm getting a little bit worried with all the logic for these added warnings. Ideally, it should be kept to a minimum. |
I totally agree. I don't think I figured out a good design, but this PR now has the minimal example via |
Looks like this is already on release-1.7? |
The intention is to use the new manifest format
julia_version
to guide the user when the manifest is (potentially) incompatible with the julia version.julia_version
field in the manifest is now only set during resolve@warn
(maxlog = 1 per manifest path) when loading the manifest (any action that usesContext()
plus a direct instantiate of a manifest)For old format manifests:
For new format manifests with the
julia_version
field:Questions:
When should the warning also be shown? After activate?
What if julia is started up via
--project
. Should there be a warning in the julia repl?On master/non-released versions the full version check could create a lot of noise. Should the version check just be for
major.minor
? Edit: Implemented