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

Workaround opam config var being removed in Opam 2.1 #4640

Merged
merged 2 commits into from
Jun 1, 2021

Conversation

voodoos
Copy link
Collaborator

@voodoos voodoos commented May 21, 2021

I recently updated to a beta version of Opam 2.1 and the following error shows when using opam config var prefix:

opam: var was removed in version 2.1 of the opam CLI, but version 2.1 has been requested. Use opam var instead or set OPAMCLI environment variable to 2.0.

Two mitigations are possible:

  1. Exporting OPAMCLI=2.0
  2. Using opam var prefix instead

This PR implements option 2. However if I am not mistaken this will only work with opam >= 2.0 and I don't know if that is a satisfying constraint for Dune ? Edit: the opam file does state opam-version: "2.0" so I guess this is not an issue.

@voodoos voodoos requested a review from emillon May 21, 2021 09:53
@voodoos voodoos changed the title Workaround opam config var being deprecated in Opam 2.1 Workaround opam config var being removed in Opam 2.1 May 21, 2021
Copy link
Collaborator

@emillon emillon left a comment

Choose a reason for hiding this comment

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

Yes, that works for opam >= 2.0. As we said in a meeting a couple months ago, we are going to drop support for opam 1.x in 3.0 anyway. Note that the version in the opam file is only relevant for users that install dune through opam - it's still possible to use a dune binary installed from somewhere else and (before this PR) it will be able to detect and interact with an opam 1 system.

@voodoos voodoos added this to the 3.0 milestone May 21, 2021
@ghost
Copy link

ghost commented May 24, 2021

we are going to drop support for opam 1.x in 3.0 anyway

FTR, this happened in #4280. There is even a version check.

@voodoos
Copy link
Collaborator Author

voodoos commented May 28, 2021

Just rebased, green light to merge ?

@ghost
Copy link

ghost commented Jun 1, 2021

Go for it

voodoos added 2 commits June 1, 2021 11:42
Signed-off-by: Ulysse Gérard <thevoodoos@gmail.com>
Signed-off-by: Ulysse Gérard <thevoodoos@gmail.com>
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.

2 participants