opam icon indicating copy to clipboard operation
opam copied to clipboard

`--ignore-constraints-on` doesn't ignore package `available` constraints

Open sim642 opened this issue 3 years ago • 2 comments

The option currently applies to only dependency version constraints according to the man page:

       --ignore-constraints-on[=PACKAGES] (default=)
           Forces opam to ignore version constraints on all dependencies to
           the listed packages. This can be used to test compatibility, but
           expect builds to break when using this. Note that version
           constraints on optional dependencies and conflicts are unaffected.
           This is equivalent to setting $OPAMIGNORECONSTRAINTS.

However the option name itself sounds more general, so it could also apply to package available constraints. In particular, it could further help with compatibility testing when the package currently has been made unavailable on certain OS-s, architectures, etc.

sim642 avatar Sep 08 '22 18:09 sim642

For anyone looking at this issue (cc @WardBrian), the common workaround for this is opam pin edit <your-pkg> which pins the package you want to install and opens an editor and allows you to remove the available constraint.

kit-ty-kate avatar Dec 11 '25 15:12 kit-ty-kate

That does seem great for testing! However, if I find that it does work for me, the next step is doing something in a non interactive CI environment, where a flag would be much appreciated

WardBrian avatar Dec 11 '25 15:12 WardBrian