-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Revdeps
The reverse dependencies (revdeps) of a package P is the set of package versions that depend on P. By checking the revdeps of when new packages are pending publication, we are able to detect breaking API changes. Failure of these checks indicates either an unintended breaking API change or the need to add upper bounds to the dependencies.
To see what will be tested by the revdeps checks you can run opam list --depends-on <target-package> --recursive --all --depopts --all-versions
. We only test revdeps on the latest ocaml 4 and ocaml 5 compilers on Ubuntu.
When a package pending publication has intended breaking changes, it is necessary to put an upper bound on all of its revdeps. E.g., if package foo.0.2.0
is introducing changes that cause a subset of its revdeps, S, to fail the revdeps check, then all the packages in S should be given the upper bound to their dependency on foo "foo" {< "0.2.0"}
. This ensures that any installation of one of these package versions will install a version of foo
with which they are compatible.
You can use opam admin add-constraint
to automatically add upper bounds to all the revdeps of a package, or to a select subset of packages. Run opam admin add-constraint --help
to see the docs on its usage.