tarides / opam-monorepo

Assemble dune workspaces to build your project and its dependencies as a whole

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Silent failure when there is a cycle

TheLortex opened this issue · 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!