spack/lib/spack
Massimiliano Culpo d54611af2c
Split satisfies(..., strict=True/False) into two functions (#35681)
This commit formalizes `satisfies(lhs, rhs, strict=True/False)`
and splits it into two functions: `satisfies(lhs, rhs)` and
`intersects(lhs, rhs)`.

- `satisfies(lhs, rhs)` means: all concrete specs matching the
   left hand side also match the right hand side
- `intersects(lhs, rhs)` means: there exist concrete specs
   matching both lhs and rhs.

`intersects` now has the property that it's commutative,
which previously was not guaranteed.

For abstract specs, `intersects(lhs, rhs)` implies that
`constrain(lhs, rhs)` works.

What's *not* done in this PR is ensuring that
`intersects(concrete, abstract)` returns false when the
abstract spec has additional properties not present in the
concrete spec, but `constrain(concrete, abstract)` will
raise an error.

To accomplish this, some semantics have changed, as well
as bugfixes to ArchSpec:
- GitVersion is now interpreted as a more constrained
  version
- Compiler flags are interpreted as strings since their
  order is important
- Abstract specs respect variant type (bool / multivalued)
2023-03-08 13:00:53 +01:00
..
docs docs: added platform conflicts example, fix quotes (#35771) 2023-03-08 10:10:01 +01:00
env compiler wrapper: parse Wl and Xlinker properly (#35912) 2023-03-08 09:03:31 +01:00
external license year bump (#34921) 2023-01-18 14:30:17 -08:00
llnl windows: use sys.platform == "win32" instead of is_windows (#35640) 2023-03-05 07:58:05 -08:00
spack Split satisfies(..., strict=True/False) into two functions (#35681) 2023-03-08 13:00:53 +01:00
spack_installable license year bump (#34921) 2023-01-18 14:30:17 -08:00