JuliaLang / Pkg.jl

Pkg - Package manager for the Julia programming language
https://pkgdocs.julialang.org
Other
624 stars 267 forks source link

Proposal: warn (at least) on activation of a project made with a different Julia version #3019

Open sylvaticus opened 2 years ago

sylvaticus commented 2 years ago

Making an issue here as suggested on the discourse thread.

The idea is that now Manifest holds the information on the Julia version itself but "ignores" this information if activating the environment from another Julia version. While it is true that it does issue a warning in instantiating it, sometimes you don't need to instantiate. For example, I did start a new environment in Julia 1.7, add DataFrames and then activated it from Julia 1.8 beta, I had no warning. Yes, the package I were using were the same, but Julia wasn't, and I think this breaks the promise of replicability of Manifest.toml.

An option could always be added to activate NOT to warn/error in such cases (eg strict = false)...

KristofferC commented 2 years ago

One issue is when running with --project=... in that case no Pkg code is run. So to also catch that you would need to implement this in Base.