This includes:
- Much better variant support (+debug/-debug)
- Optional dependency support (depends_on(... , when='<condition>')
- New config file format (YAML in ~/.spack)
- New Spec format (YAML in $prefix/.spack/spec.yaml)
- Can depend conditionally based on variant, compiler, arch, deps, etc
- normalize() is not iterative yet: no chaining depends_ons
- really need a SAT solver, but iterative will at least handle
simple cases.
- Added "strict" option to Spec.satisfies()
- strict checks that ALL of other's constraints are met (not just
the ones self shares)
- Consider splitting these out into two methods: could_satisfy() and
satisfies()
- didn't do this yet as it would require changing code that uses
satisfies()
- Changed semantics of __contains__ to use strict satisfaction (SPACK-56)
- Added tests for optional dependencies.
- The constrain() method on Specs, compilers, versions, etc. now
returns whether the spec changed as a result of the call.
- Variant concretization is tricky:
- During concretization, a spec without variants (e.g., mpich) means
"don't care". So, Spec('mpich').satisfies('mpich+debug') is true
because it *could* still be built that way.
- After concretization, a spec without a particular variant means
"don't know", as that wasn't part of the spec, so the opposite
relationship is true. Assume 'spec' is already installed:
spec.satisfies('mpich+debug')
this is false beacuse the `debug` variant didn't exist when spec
was built, so we can't satisfy the explicit request for +debug.
- Variants are now declarable in packages using the variant() directive.
- Variants are checked - you can't just ask for a random variant, it has to be declared.
- conditional logic (@when, if, '+debug' in spec, etc.) still required in package to
implement variant.