When the command to install only depexts fails, the shell command produces an error code 0, not classifying it as an error. For example, on ocaml-cohttp, this is what happens:
$ opam install ./ --depext-only --with-test --with-doc
[NOTE] Package cohttp-lwt-unix is already installed (current version is 6.1.0).
[NOTE] Package cohttp-lwt is already installed (current version is 6.1.0).
[NOTE] Package cohttp is already installed (current version is 6.1.0).
[NOTE] Package http is already installed (current version is 6.1.0).
[ERROR] Package conflict!
* No agreement on the version of ocaml-base-compiler:
- (invariant) -> ocaml-base-compiler >= 5.3.0
- cohttp-async -> ocaml < 5.3.0 -> ocaml-base-compiler < 5.2.2~
You can temporarily relax the switch invariant with `--update-invariant'
* Incompatible packages:
- (invariant) -> ocaml-base-compiler >= 5.3.0
- cohttp-async -> ocaml < 5.3.0 -> dkml-base-compiler
* Incompatible packages:
- (invariant) -> ocaml-base-compiler >= 5.3.0
- cohttp-async -> ocaml < 5.3.0 -> ocaml-system >= 3.09.1
* Incompatible packages:
- (invariant) -> ocaml-base-compiler >= 5.3.0
- cohttp-async -> ocaml < 5.3.0 -> ocaml-variants
* Missing dependency:
- cohttp-async -> ocaml < 5.3.0 -> ocaml-variants -> xenbigarray
unknown package
* Missing dependency:
- cohttp-async -> ocaml < 5.3.0 -> ocaml-variants -> ocaml-beta
unmet availability conditions: 'enable-ocaml-beta-repository'
* Missing dependency:
- cohttp-async -> ocaml < 5.3.0 -> ocaml-variants -> system-msvc
unmet availability conditions: 'os = "win32"'
And looking at the error code:
It would be useful if opam could classify this as an error and assign an error code.
When the command to install only depexts fails, the shell command produces an error code 0, not classifying it as an error. For example, on ocaml-cohttp, this is what happens:
And looking at the error code:
It would be useful if opam could classify this as an error and assign an error code.