tarides/opam-monorepo

Silent failure when there is a cycle

TheLortex opened this issue · 1 comments

So I've accidentally generated something similar to this opam file:
opam-monorepo.opam

opam-version: "2.0"
depends: [
    "opam-monorepo"
]
dev-repo: "opam-monorepo"
url {
  src: "https://github.com/ocaml/opam-monorepo.git"
}

where the main problem is that the package depend on itself.

Surprisingly, the solver doesn't complain and write a lockfile with 0 entries.

If the opam file has another name (no cycle), the solver works as expected and writes a lockfile with 36 entries.

Good cacth! I have a slight idea how this might happen and it shouldn't be too hard to fix!