-
- Downloads
Spec: prefer a splice-specific method to `__len__` (#47585)
Automatic splicing say `Spec` grow a `__len__` method but it's only used in one place and it's not clear the semantics are useful elsewhere. It also runs the risk of Specs one day being confused for other types of containers. Rather than introduce a new function for one algorithm, let's use a more specific method in the splice code. - [x] Use topological ordering in `_resolve_automatic_splices` instead of sorting by node count - [x] delete `Spec.__len__()` and `Spec.__bool__()` --------- Signed-off-by:Todd Gamblin <tgamblin@llnl.gov> Co-authored-by:
Greg Becker <becker33@llnl.gov> Co-authored-by:
Massimiliano Culpo <massimiliano.culpo@gmail.com>
Showing
- lib/spack/spack/solver/asp.py 12 additions, 3 deletionslib/spack/spack/solver/asp.py
- lib/spack/spack/solver/concretize.lp 7 additions, 7 deletionslib/spack/spack/solver/concretize.lp
- lib/spack/spack/spec.py 1 addition, 15 deletionslib/spack/spack/spec.py
- lib/spack/spack/test/abi_splicing.py 16 additions, 0 deletionslib/spack/spack/test/abi_splicing.py
- lib/spack/spack/test/cmd/pkg.py 1 addition, 0 deletionslib/spack/spack/test/cmd/pkg.py
- var/spack/repos/builtin.mock/packages/splice-depends-on-t/package.py 22 additions, 0 deletions...epos/builtin.mock/packages/splice-depends-on-t/package.py
Loading
Please register or sign in to comment