Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
1.2.0
-
None
Description
the current recommendation to make a prioritized list of alternative dependencies is daisy-chaining optional dependencies by their condition, ending with the least desired one being mandatory.
the downside of this approach is that if neither one is available, the complaint will be actually about the least desirable one. this is obviously not too helpful.
that means that is must be possible to explicitly declare alternatives and prioritize them:
Product { ... AlternativeDepends { Depends { name: "gnutls" priority: 0 } Depends { name: "openssl" priority: 1 } Depends { name: "nss" priority: 2 } } }
or maybe like that:
Product { ... Depends { alternatives: // Array of Depends. property name is optional - it's actually the auto-append property. [{ name: "gnutls" priority: 0 }, { name: "openssl" priority: 1 }, { name: "nss" priority: 2 }] } }
or maybe like that:
Product { ... Depends { name: "gnutls" group: "ssl" priority: 0 } Depends { name: "openssl" group: "ssl" priority: 1 } Depends { name: "nss" group: "ssl" priority: 2 } }
additional consideration: what if an alternative actually needs multiple modules to be satisfied?
maybe it would make sense to say that all dependencies with the same priority must be satisfied at the same time (rather than conflicting).
Attachments
Issue Links
- relates to
-
QBS-61 support multiple instances of the same logical module
- Open