-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test opam constraints of multi-package repositories separately #257
Comments
I think the solution to this is:
Dune knows which libraries go in each package, and which other libraries they depend on. It also knows which opam package those libraries are from. It should therefore be able to warn you if you fail to declare a dependency on an internal or external library. (dune already added a check for the related problem of depending on another package using its internal name: ocaml/dune#3727) |
For dune to solve this issue completely, it would need to also consider the cases of cyclic dependencies (annotated with Also note that Dune's support for |
I've made a separate linter that should help with this: https://github.com/talex5/dune-opam-lint/ It works by checking that every entry in your It doesn't check internal dependencies at the moment, but dune can do that itself if generating the opam files ( |
OCaml-CI's current strategy for running tests of multi-package repositories is to first pin all of the packages and then install them all in the same switch and run
dune runtest
. This approach has two undesirable consequences:missing external dependencies may be ignored by OCaml-CI, if those dependencies are introduced by another package in the same repository (e.g.
irmin-pack
andirmin-git
both depend onalcotest
, but this dependency is missing fromirmin-git.opam
);missing internal dependencies will always be ignored by OCaml-CI, since those dependencies are always available in the test switch by default.
It would be nice to have some CI solution that still tests that the
opam
metadata corresponds to the true project dependencies, as otherwise this becomes an issue that is only discovered at the point of release (see mirage/repr#12). This is the major reason that we still have Travis CI running (very slowly) on certainmirage/
repositories.CC @avsm.
The text was updated successfully, but these errors were encountered: