Closed gridbugs closed 1 week ago
I got a different cycle by following your steps:
Dependency cycle between:
- package react
-> _build/_private/default/.pkg/ocamlfind/target/cookie
-> - package topkg
-> - package react
I get this when I replace ocaml
with ocaml-system
, lock and try to build:
Error: Dependency cycle between:
- package base-bytes
-> _build/_private/default/.pkg/ocamlfind/target/cookie
-> - package base-bytes
It looks like the dependency is introduced via ocplib-endian
which in turn depends on base-bytes
and base-bytes
depends on ocamlfind
. But ocamlfind
in our lock directory does not depend on base-bytes
. It seems somehow we accidentally introduce an incorrect dependency to ocamlfind (which only depends on ocaml
and is correctly locked that way).
After removing the ocamlfind
dependency from base-bytes
I got the same error as Rudi:
Error: Dependency cycle between:
- package react
-> _build/_private/default/.pkg/ocamlfind/target/cookie
-> - package topkg
-> - package react
The only other dependencies on ocamlfind
are topkg
and react
(which depends on ocamlfind
and topkg
) and removing them unlocks the dependency cycle but fails to build. It seems there's something weird about ocamlfind
, but we don't special-case it in the package rule code and the lock result looks totally correct.
To reproduce, run:
There's no obvious dependency cycle between lockfiles. Projects that depend on
lwt
build fine with dune package management. This problem only happens when building thelwt
project itself.I'll update this issue as I find more projects with this problem.