-
Notifications
You must be signed in to change notification settings - Fork 368
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
Set OPAMCLI=2.0 by default during compilation/install/remove phases #4492
Conversation
People who want to use the 2.1 features should be using --cli=2.1 or build-env: OPAMCLI = "2.1"
I've been trying to add tests for this, but I'm unsure where I should put it. Any idea? |
I've added a test in cli versioning one, can you check that it is exhaustive, what you had in mind to test ? |
LGTM, thank you! Note that |
I haven't reviewed the reftests PR yet - do they use the system-installed |
@dra27 I don't think. In reftests, it's the newly compiled opam that is used to launch command to test, a substitution is done. But in test added in this PR, I want to test an opam call inside an opam package, and these call use the system installed opam. The requirement for the installed opam is to have cli versioning working because test output is based on its error messages. |
…e OPAMCLI variable can be overwritten
I've changed the tests. Feel free to add more if you feel like it should but as is I think this should be good to merge. |
This seems sensible; my worry is that we really don't want to encourage calls to |
I think it is way too late to worry about this right now. People started using it this way years ago. |
I agree with @kit-ty-kate -- it's use is common (even though we want to discourage it). I'm in favour of this change. |
Just one note: this definitely needs to be documented in the manual somewhere. |
Good point. There was no section documenting the default environment variables so I've documented this in #4496. (separately because I'd rather avoid blocking this PR and the release on documentation) |
I also agree - the stable door is definitely off its hinges! CLI versioning and configuration information in the build are orthogonal features (even if CLI versioning does make using the opam command in build scripts less brittle) |
Thanks both for the idea and the PR, @kit-ty-kate! |
People who want to use the 2.1 features should be using
--cli=2.1
orbuild-env: OPAMCLI = "2.1"
Tested successfully using the following opam files:
Fixes #4491