Skip to content

opam install --deps-only uses the wrong opam definition when building a package #6535

@kit-ty-kate

Description

@kit-ty-kate

Similarly to #6529, the build steps also use the wrong opam definition.
Using #6530 + #6533 + #6522 + #6520:

$ cat opam
opam-version: "2.0"
name: "test"
depends: ["miou"]
$ opam install .
[test] Installing new package description from upstream file:///tmp/tmp
The following actions will be performed:
=== install 2 packages
  ∗ miou 0.3.1 [required by test]
  ∗ test dev

Proceed with ∗ 1 installation? [Y/n] y

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⬇ retrieved miou.0.3.1  (cached)
∗ installed miou.0.3.1
∗ installed test.dev
Done.

$ cat opam
opam-version: "2.0"
name: "test"
build: "false"
depends: ["miou" {= "0.3.0"}]
$ opam install --deps .
The following actions will be performed:
=== downgrade 1 package
  ↘ miou 0.3.1 to 0.3.0 [required by test]
=== recompile 1 package
  ↻ test dev (pinned)   [uses miou]

Proceed with ↘ 1 downgrade and ↻ 1 recompilation? [Y/n] y

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⬇ retrieved miou.0.3.0  (cached)
⬇ retrieved test.dev  (file:///tmp/tmp)
⊘ removed   test.dev
⊘ removed   miou.0.3.1
∗ installed miou.0.3.0
[ERROR] The compilation of test.dev failed at "false".

#=== ERROR while compiling test.dev ===========================================#
# context     2.4.0~alpha3~dev | linux/arm64 | kit-ty-kate-platform.1 ocaml-base-compiler.5.4.0~alpha1 | pinned(file:///tmp/tmp)
# path        ~/.opam/5.4/.opam-switch/build/test.dev
# command     ~/.opam/opam-init/hooks/sandbox.sh build false
# exit-code   1
# env-file    ~/.opam/log/test-21406-cf6c92.env
# output-file ~/.opam/log/test-21406-cf6c92.out

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions