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

Is setting OPAM_CLI from the action necessary? #709

Closed
jchavarri opened this issue Oct 19, 2023 · 4 comments · Fixed by #711
Closed

Is setting OPAM_CLI from the action necessary? #709

jchavarri opened this issue Oct 19, 2023 · 4 comments · Fixed by #711
Labels
bug Something isn't working

Comments

@jchavarri
Copy link

Currently, it is possible to use opam 2.2 through the recently added allow-prelease-opam config (thanks!).

However, when one tries to use features from this version, like the --with-dev-setup flag, opam will error with:

opam: --with-dev-setup was added in version 2.2 of the opam CLI, but version 2.0 has been requested, which is older.

The reason for this is that setup-ocaml will set OPAMCLI to 2.0 here:

core.exportVariable("OPAMCLI", "2.0");

I wonder if setting this config in the action is strictly necessary? Wouldn't it be easier to just leave this version "float" and have opam used the latest version available?

@smorimoto
Copy link
Member

See #711 🙂

@smorimoto smorimoto added the bug Something isn't working label Oct 19, 2023
@jchavarri
Copy link
Author

Nice! For the record, I managed to work around the original issue by passing --cli flag to the opam command. Just mentioning in case the changes in #711 were somehow controversial, for some reason (maybe it's better to stick with a default version in all cases, idk).

@smorimoto
Copy link
Member

It's true that you can use --cli to avoid the issue, but in cases where you want to allow pre-release, the environment variable is just noisy, so it seems sensible to leave it unset.

@smorimoto
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants