Skip to content
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

Makefile: Set OPAMCLI to 2.0 #364

Merged
merged 1 commit into from
Dec 6, 2023
Merged

Conversation

Alasdair
Copy link
Collaborator

@Alasdair Alasdair commented Dec 1, 2023

This removes the warning about opam config var. Setting OPAMCLI in this way is the correct thing to do if we want to continue supporting opam 2.0.

If we decide to require opam 2.1+ then all opam var invocations should become opam --cli=2.1 var, as per the opam CLI versioning spec:

https://github.com/ocaml/opam/wiki/Spec-for-opam-CLI-versioning

This removes the warning about `opam config var`. Setting OPAMCLI in
this way is the correct thing to do if we want to continue supporting
opam 2.0.

If we decide to require opam 2.1+ then all `opam var` invocations should
become `opam --cli=2.1 var`, as per the opam CLI versioning spec:

https://github.com/ocaml/opam/wiki/Spec-for-opam-CLI-versioning
Copy link

github-actions bot commented Dec 1, 2023

Test Results

712 tests  ±0   712 ✔️ ±0   0s ⏱️ ±0s
    6 suites ±0       0 💤 ±0 
    1 files   ±0       0 ±0 

Results for commit 545000d. ± Comparison against base commit 153f983.

Copy link
Collaborator

@billmcspadden-riscv billmcspadden-riscv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@billmcspadden-riscv billmcspadden-riscv merged commit f7163af into riscv:master Dec 6, 2023
2 checks passed
@Alasdair
Copy link
Collaborator Author

Alasdair commented Dec 7, 2023

Hmm, is anyone else still seeing these warnings? I'm thinking I maybe tricked myself into thinking this fixed it somehow. I think maybe you actually need to set it in every subshell like:

$(shell OPAMCLI=2.0 opam config var ...)

to get rid of all the warnings

@bacam
Copy link
Collaborator

bacam commented Dec 7, 2023

I'm still getting them. Experimenting a little, it appears that the shell function isn't affected by export, at least in GNU make 4.3. It's probably worth keeping the assignment, though, and using $(shell OPAMCLI=$(OPAMCLI) ...) so that there's a consistent setting everywhere, including inside scripts.

On a related note, we should use := for all the uses of shell to ensure that they're only run once. That speeds up all make invocations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants