Open AllanBlanchard opened 2 years ago
I don't think it's supported at the moment. In the dune abstraction, a package has a list of dependencies, and a dependency is a package name with an optional constraint. As a workaround for now it's possible to put the depends:
field in a .opam.template
file.
cc @Leonidas-from-XIV and @gridbugs
if the 0install solver supports this, then we are free to add this feature.
According to my tests (test/blackbox-tests/test-cases/pkg/lockfile-generation.t/run.t
) the 0install solver has no issues finding solutions to such requests.
Re-assigning this to @gridbugs. He will try to find a more comprehensive and unified way of handling all possible constraints.
Desired Behavior
In Opam files, one can write something like:
to say that either a package or another is needed. For example, here : any of alt-ergo or alt-ergo-free is OK (basically because they provide the same executable). However, it seems that while there is a syntax to say that we expect a version or another, we do not have the same for packages themselves.
Example
From a
dune-project
like:I'd like to get an
opam
file like:Currently this is an error: