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

Update opam install command to correct flag #7340

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jderochervlk
Copy link
Contributor

I noticed while following the setup steps that one of the flags was no longer correct.

$ opam install . --deps-only --with-test --with-dev-setup -y

opam: unknown option `--with-dev-setup', did you mean `-w' ?
Usage: opam install [OPTION]... [PACKAGES]...
Try `opam install --help' or `opam --help' for more information.

From what I can tell that flag is no longer needed: ocaml/dune#10538

cknitt
cknitt previously approved these changes Mar 13, 2025
Copy link
Member

@cknitt cknitt left a comment

Choose a reason for hiding this comment

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

Thanks!

@mediremi
Copy link
Contributor

Is it possible you're using opam version 2.1.x or below?

--with-dev-setup was introduced in opam v2.2.0, released July 2024: https://opam.ocaml.org/blog/opam-2-2-0/#Major-change-with-dev-setup

When I initially followed the setup steps, I ran into the same issue as you, but it turned out to be from using the version of opam from the Ubuntu 24.04 repos - currently v2.1.5

When I installed opam with bash -c "sh <(curl -fsSL https://opam.ocaml.org/install.sh)" to get v2.3.0, I no longer had this issue:

~ opam --version
2.3.0
                                                                                                                                     
~ opam install --help | grep with-dev
       --with-dev-setup
       OPAMWITHDEVSETUP see install option `--with-dev-setup'.

@cknitt
Copy link
Member

cknitt commented Mar 14, 2025

Ah right, it even says so in #6901 where this flag was introduced.

I guess this PR can be closed then?

@cknitt cknitt dismissed their stale review March 14, 2025 07:48

Dismissing review because the flag is valid in opam >= 2.2.0

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.

3 participants