opam
opam copied to clipboard
`opam install . --deps-only --locked` doesn't install dev depedencies
If I install my dependencies with:
opam install . --deps-only --locked
it doesn't install the dev dependencies.
Removing --deps-only fixes it.
Same thing with:
opam switch create . --deps-only --locked
I was able to reproduce the issue with a simple opam file:
opam-version: "2.0"
depends: [
"conf-which" {dev}
]
Running opam switch create . --deps-only does not install anything, but a subsequent opam install . does install conf-which
Tested with opam master (https://github.com/ocaml/opam/commit/d5c652c36de7ac89163594c84a6a8c016a08ed1a)
I see a very similar problem, but without --locked. See the session below. opam install -y --deps-only . correctly pins the tcpip package, but does not install it, although it claims it would do. opam upgrade -y tcpip installs the dev version. Running opam install -y --deps-only . again afterwards says "nothing to do", so obviously there is no conflict of constraints.
$ opam install -y --deps-only .
[WARNING] Failed checks on mirage-unikernel-keyfender-unix package definition from source at file:///Users/svanders/nethsm/nethsm/src/s_keyfender:
warning 49: The following URLs don't use version control but look like version control URLs:
"ssh://[email protected]/nitrokey/nethsm/nethsm.git#HEAD"
The following additional pinnings are required by mirage-unikernel-keyfender-unix.~dev:
- tcpip.dev at git+https://github.com/TheLortex/mirage-tcpip.git#b9b88d956279bc8b31732cf063f2541fd21c427d
Pin and install them? [Y/n] y
[tcpip.dev] synchronised (no changes)
tcpip is now pinned to git+https://github.com/TheLortex/mirage-tcpip.git#b9b88d956279bc8b31732cf063f2541fd21c427d (version dev)
Nothing to do.
$ opam upgrade -y tcpip
<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><> 🐫
[tcpip.dev] synchronised (no changes)
The following actions will be performed:
↗ upgrade tcpip 7.1.0 to dev*
↻ recompile paf 0.0.9 [uses tcpip]
↻ recompile mirage-stack 4.0.0 [uses tcpip]
↻ recompile mirage-protocols 8.0.0 [uses tcpip]
↻ recompile logs-syslog 0.3.1 [uses tcpip]
↻ recompile dns-client 6.2.2 [uses tcpip]
↻ recompile git-paf 3.8.0 [uses tcpip]
↻ recompile mirage-types 3.10.8 [uses mirage-protocols, mirage-stack]
↻ recompile happy-eyeballs-mirage 0.1.3 [uses tcpip]
↻ recompile conduit-mirage 5.0.0* [uses dns-client, mirage-stack]
↻ recompile mirage-types-lwt 3.10.8 [uses mirage-types]
↻ recompile git-mirage 3.8.0 [uses tcpip]
↻ recompile cohttp-mirage 5.0.0* [uses conduit-mirage]
↻ recompile keyfender ~dev* [uses tcpip]
===== ↻ 13 ↗ 1 =====
Do you want to continue? [Y/n] y
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> 🐫
⬇ retrieved dns-client.6.2.2 (cached)
⬇ retrieved git-mirage.3.8.0 (cached)
⬇ retrieved git-paf.3.8.0 (cached)
⬇ retrieved happy-eyeballs-mirage.0.1.3 (cached)
⬇ retrieved keyfender.~dev (no changes)
⬇ retrieved conduit-mirage.5.0.0 (no changes)
⬇ retrieved cohttp-mirage.5.0.0 (no changes)
⬇ retrieved logs-syslog.0.3.1 (cached)
⬇ retrieved mirage-stack.4.0.0 (cached)
⬇ retrieved mirage-protocols.8.0.0 (cached)
⬇ retrieved mirage-types.3.10.8 (cached)
⬇ retrieved paf.0.0.9 (cached)
⬇ retrieved mirage-types-lwt.3.10.8 (cached)
⬇ retrieved tcpip.dev (no changes)
⊘ removed git-mirage.3.8.0
⊘ removed git-paf.3.8.0
⊘ removed happy-eyeballs-mirage.0.1.3
⊘ removed keyfender.~dev
⊘ removed cohttp-mirage.5.0.0
⊘ removed conduit-mirage.5.0.0
⊘ removed dns-client.6.2.2
⊘ removed logs-syslog.0.3.1
⊘ removed mirage-types-lwt.3.10.8
⊘ removed mirage-types.3.10.8
⊘ removed mirage-protocols.8.0.0
⊘ removed mirage-stack.4.0.0
⊘ removed paf.0.0.9
⊘ removed tcpip.7.1.0
∗ installed tcpip.dev
∗ installed mirage-stack.4.0.0
∗ installed mirage-protocols.8.0.0
∗ installed mirage-types.3.10.8
∗ installed logs-syslog.0.3.1
∗ installed paf.0.0.9
∗ installed mirage-types-lwt.3.10.8
∗ installed dns-client.6.2.2
∗ installed git-paf.3.8.0
∗ installed happy-eyeballs-mirage.0.1.3
∗ installed git-mirage.3.8.0
∗ installed conduit-mirage.5.0.0
∗ installed cohttp-mirage.5.0.0
∗ installed keyfender.~dev
Done.
<><> mirage-types-lwt.3.10.8 installed successfully <><><><><><><><><><><><> 🐫
=> This package will be retired in MirageOS 4.0. Please use individual signatures (mirage-net / mirage-clock / etc.) instead.
<><> mirage-types.3.10.8 installed successfully <><><><><><><><><><><><><><> 🐫
=> This package will be retired in MirageOS 4.0. Please use individual signatures (mirage-net / mirage-clock / etc.) instead.
<><> mirage-stack.4.0.0 installed successfully ><><><><><><><><><><><><><><> 🐫
=> This package is deprecated. Please use the module types in Tcpip.Stack directly.
<><> mirage-protocols.8.0.0 installed successfully ><><><><><><><><><><><><> 🐫
=> This package is deprecated. Please use Ethernet.S, Arp.S, or the Tcpip module types directly
$ opam install -y --deps-only .
[WARNING] Failed checks on mirage-unikernel-keyfender-unix package definition from source at file:///Users/svanders/nethsm/nethsm/src/s_keyfender:
warning 49: The following URLs don't use version control but look like version control URLs:
"ssh://[email protected]/nitrokey/nethsm/nethsm.git#HEAD"
Nothing to do.
$ opam pin
cohttp.5.0.0 git git+https://github.com/dinosaure/ocaml-cohttp.git#d8760c660ec1021ba51488fde391d2623aea7498
cohttp-lwt.5.0.0 git git+https://github.com/dinosaure/ocaml-cohttp.git#d8760c660ec1021ba51488fde391d2623aea7498
cohttp-mirage.5.0.0 git git+https://github.com/dinosaure/ocaml-cohttp.git#d8760c660ec1021ba51488fde391d2623aea7498
conduit-mirage.5.0.0 git git+https://github.com/dinosaure/ocaml-conduit.git#e65c4d8ae35cad32dcec5658e8c0f9860ffcc1f8
keyfender.~dev rsync file:///Users/svanders/nethsm/nethsm/src/keyfender#HEAD
tcpip.dev git git+https://github.com/TheLortex/mirage-tcpip.git#b9b88d956279bc8b31732cf063f2541fd21c427d
$ cat mirage-unikernel-keyfender-unix.opam
# Generated by _build/default/config.exe config -t unix --internal-net=direct --no-platform=true --retry=true --no-depext (2022-07-19 09:25:47-00:00).
opam-version: "2.0"
name: "mirage-unikernel-keyfender-unix"
depends: [ "arp" { >= "3.0.0" & < "4.0.0"}
"cohttp-mirage"
"conduit-mirage"
"crunch" {build & >= "3.1.0" & < "4.0.0"}
"ethernet" { >= "3.0.0" & < "4.0.0"}
"functoria-runtime"
"git-mirage" { >= "3.8.0" & < "3.9.0"}
"irmin-git" { >= "2.10.0" & < "3.0.0"}
"irmin-mirage" { >= "2.10.0" & < "3.0.0"}
"keyfender"
"logs-syslog" { >= "0.3.0"}
"lwt"
"memtrace-mirage"
"metrics-lwt"
"mirage" {build & >= "3.10.0" & < "3.11.0"}
"mirage-bootvar-unix" { >= "0.1.0" & < "0.2.0"}
"mirage-clock-unix" { >= "3.0.0" & < "5.0.0"}
"mirage-console-unix" { >= "4.0.0" & < "5.0.0"}
"mirage-crypto-rng-mirage" { >= "0.8.0" & < "0.11.0"}
"mirage-kv-mem" { >= "3.0.0" & < "4.0.0"}
"mirage-logs" { >= "1.2.0" & < "2.0.0"}
"mirage-net-unix" { >= "2.7.0" & < "3.0.0"}
"mirage-runtime" { >= "3.10.0" & >= "3.10.4" & < "3.11.0"}
"mirage-types" { >= "3.10.0" & < "3.11.0"}
"mirage-types-lwt" { >= "3.10.0" & < "3.11.0"}
"mirage-unix" { >= "4.0.0" & < "5.0.0"}
"ocaml" {build & >= "4.08.0"}
"ocamlbuild" {build}
"ocamlfind" {build}
"tcpip"
]
pin-depends: [ ["tcpip.dev" "git+https://github.com/TheLortex/mirage-tcpip.git#b9b88d956279bc8b31732cf063f2541fd21c427d"]
]
maintainer: "dummy"
authors: "dummy"
homepage: "dummy"
bug-reports: "dummy"
dev-repo: "git+https://example.com/nonexistent"
build: [ "sh" "-exc" "cd src/s_keyfender && mirage config -t unix --internal-net=direct --no-platform=true --retry=true --no-depext && mirage build" ]
synopsis: "This is a dummy"
install: [
[ "cp" "src/s_keyfender/_build/main.native" "%{bin}%/keyfender" ]
]
url { src: "[email protected]:nitrokey/nethsm/nethsm.git#HEAD" }
As an additional remark, when I tried to reproduce with opam 2.0.10 it would work, so I guess it's a rather recent regression.