diff options
author | Nathan Hanford <8302958+nhanford@users.noreply.github.com> | 2021-02-23 13:56:00 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-23 13:56:00 -0800 |
commit | 8ef67e2b159e86332de2498561122f8b3ec3dd87 (patch) | |
tree | 167c5176fffb2639a51bfbd5d36b993db076d7a0 /.flake8 | |
parent | 21349a4d25ea0e4c3022fde9fd244f1e3179ebfd (diff) | |
download | spack-8ef67e2b159e86332de2498561122f8b3ec3dd87.tar.gz spack-8ef67e2b159e86332de2498561122f8b3ec3dd87.tar.bz2 spack-8ef67e2b159e86332de2498561122f8b3ec3dd87.tar.xz spack-8ef67e2b159e86332de2498561122f8b3ec3dd87.zip |
New splice method in class Spec. (#20262)
* Spec.splice feature
Construct a new spec with a dependency swapped out. Currently can only swap dependencies of the same name, and can only apply to concrete specs.
This feature is not yet attached to any install functionality, but will eventually allow us to "rewire" a package to depend on a different set of dependencies.
Docstring is reformatted for git below
Splices dependency "other" into this ("target") Spec, and return the result as a concrete Spec.
If transitive, then other and its dependencies will be extrapolated to a list of Specs and spliced in accordingly.
For example, let there exist a dependency graph as follows:
T
| \
Z<-H
In this example, Spec T depends on H and Z, and H also depends on Z.
Suppose, however, that we wish to use a differently-built H, known as H'. This function will splice in the new H' in one of two ways:
1. transitively, where H' depends on the Z' it was built with, and the new T* also directly depends on this new Z', or
2. intransitively, where the new T* and H' both depend on the original Z.
Since the Spec returned by this splicing function is no longer deployed the same way it was built, any such changes are tracked by setting the build_spec to point to the corresponding dependency from the original Spec.
Co-authored-by: Nathan Hanford <hanford1@llnl.gov>
Diffstat (limited to '.flake8')
0 files changed, 0 insertions, 0 deletions