-
-
Notifications
You must be signed in to change notification settings - Fork 265
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
Throw an error if the current Julia version (Base.VERSION
) is incompatible with the [compat]
entry for julia
in the Project.toml
file
#3526
Conversation
Pkg now raises an error if the julia compat is not met for a package. `ENV["JULIA_PKG_CHECK_JULIA_COMPAT"]` can be used to override this check. This change was made due to new developers getting confused why their julia 1.8 does not work with a dev-ed package that has a julia compat set to 1.9.
|
Even if the user has set |
The TODO that I deleted used to say "either raise an error or be completely silent", so I did not want to overstep and followed those guidelines. Happy to change it though. What would be the best way for me to ask all stakeholders about their opinion? Should I tag someone here? |
Pinging @KristofferC as he is the one who wrote the "error or be quiet" TODO in #2179 |
@KristofferC , @fredrikekre , just a friendly bump on this relatively minor change. Could you give me a rough idea whether this is something to be pursued and polished for merging or to be abandoned if it is contrary to how Pkg is supposed to work? |
bump? |
Bump @KristofferC @fredrikekre |
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.
This seems like a good idea. It needs a test though. Perhaps create a test package that has an upper bound on an old julia version?
Nice. The authors of these test packages have me laughing 😂 |
Great. Can you also add a note to the NEWS.md |
Can we bikeshed the name of the environment variable? |
Maybe it should be the reverse?
|
I will wait a day before making changes to the variable name and add NEWS.md entry. Let me know if there are other suggestions. |
uhm... where is the NEWS.md? Maybe I am a bit sleep deprived, but I can not seem to find it |
I see a changelog file, but should I add this as a 1.10 or 1.11 entry? |
Changelog, my bad. And 1.11 |
src/Operations.jl
Outdated
if julia_compat !== nothing && !(VERSION in julia_compat) | ||
println(io, "julia version requirement for package $(err_rep(pkg)) not satisfied") | ||
if Base.get_bool_env("JULIA_PKG_CHECK_JULIA_COMPAT", true) && !isnothing(julia_compat) && !(VERSION in julia_compat) | ||
pkgerror("julia version requirement for package $(err_rep(pkg)) not satisfied; you can override and ignore this check by setting `ENV[\"JULIA_PKG_CHECK_JULIA_COMPAT\"]=0`") |
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.
Is this new check only enabled for packages or also projects shipped with Project.toml/Manifest.toml?
Also should we have =0
or =false
in the error message?
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 was under the impression that this is only for the active project's Project.toml
, but I might be mistaken.
@IanButterworth Can you answer this?
To keep track of this I'm assigning @DilumAluthge here to help finish this up, given he raised discussion around some of this on slack |
I completely removed the env variable as suggested on slack. Happy to undo that if someone enforces a different preference |
Base.VERSION
) is incompatible with the [compat]
entry for julia
in the Project.toml
fileBase.VERSION
) is incompatible with the [compat]
entry for julia
in the Project.toml
file
Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
I think all change requests are fulfilled. Let me know if anything is missing. |
Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com>
I think this is good to go, but I'll do one last review this weekend to make sure. |
bump |
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.
One small suggested change, but otherwise LGTM.
Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
@IanButterworth I'll leave it to you to do the final review, and to click the merge button. |
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.
This has been discussed on slack and been open here for a while and I haven't seen any disagreement, so seems worth giving a go for 1.11. Thanks @Krastanov
Thanks @Krastanov! |
And thanks @IanButterworth for sheparding this thing through! |
Pkg now raises an error if the
[compat]
entry forjulia
is not met for a package.This change was made due to new developers getting confused why their julia 1.8 does not work with a dev-ed package that has a julia compat set to 1.9.
There is no escape hatch, i.e. this behavior can not be disabled.