Alire has the ability to express dependencies that can be fulfilled by one of several projects (like OPAM does with the pipe operator). This supports at least two use cases:
The first case I think is pretty simple. It appears, e.g., when there are no other conditions (like a lib is only available in windows and another on linux) on which to select one of several possible candidates.
The second case is a bit more tricky. In the old index it was tested with gnatcoll. It came in three flavors:
To make proper use of this, the old index had two features:
Now, suppose there are projects B and C. Project B, in turn, depends on full gnatcoll. Project C, in turn, depends only on gnatcoll.xstrings. With the previous arrangement, a third project A that depends on B and C, would get a solution that can only be fulfilled by plain "gnatcoll". OTOH, a project D that depends only on C, would get the lighter "gnatcoll.xstrings" dependency:
A --> B --> gnatcoll
\-> C -/
D --> C --> gnatcoll.xstrings
To make thinks even simpler for clients, the old project xstrings encapsulated the three dependencies above, so a client interested on xstrings did not need to specify the triple OR dependency:
C --> xstrings --> gnatcoll.xstrings
I'd like to recover this functionality (it's already there) if we can think of a nice toml syntax. Perhaps something using [[depends-on.one-of]]
arrays?
Since this one is less trivial, I'm pinging both of you for opinions/experiences ;-) @pmderodat @Fabien-Chouteau
P.s.: apt
uses "provides" and "|" for roughly the above two ideas (I'm sure there are some differences).
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too