spack/lib/spack
Massimiliano Culpo 66813460c0
Add syntactic sugar for "strong preferences" and "conflicts" (#41832)
Currently requirements allow to express "strong preferences" and "conflicts" from
configuration using a convoluted syntax:
```yaml
packages:
  zlib-ng:
    require:
    # conflict on %clang
    - one_of: ["%clang", "@:"]
    # Strong preference for +shared
    - any_of: ["+shared", "@:"]
```
This PR adds syntactic sugar so that the same can be written as:
```yaml
packages:
  zlib-ng:
    conflict:
    - "%clang"
    prefer:
    - "+shared"
```
Preferences written in this way are "stronger" that the ones documented at:
- https://spack.readthedocs.io/en/latest/packages_yaml.html#package-preferences
2024-01-22 13:18:00 -08:00
..
docs Add syntactic sugar for "strong preferences" and "conflicts" (#41832) 2024-01-22 13:18:00 -08:00
env Revert "cc: work around -v split between ld and ccld" (#42196) 2024-01-19 17:59:41 +01:00
external Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00
llnl Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00
spack Add syntactic sugar for "strong preferences" and "conflicts" (#41832) 2024-01-22 13:18:00 -08:00
spack_installable Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00