Update opam install command to correct flag
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: https://github.com/ocaml/dune/issues/10538
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'.
Ah right, it even says so in #6901 where this flag was introduced.
I guess this PR can be closed then?
--with-dev-setupwas introduced in opam v2.2.0
And the contributing guide already says opam 2.2.0 is needed. Should probably say ">= 2.2.0" - @jderochervlk would you like to update this PR to make that clearer in the contributing guide?
If you're using the devcontainer, it's a problem with the container which is installing opam via APT.
The latest version of OPAM in the Bookworm's registry is 2.1.2