Skip to content
Snippets Groups Projects
Commit ca07461b authored by Eleni Mathioulaki's avatar Eleni Mathioulaki
Browse files

update DAG hash calculation to include test dependencies

Spack's spec hashing mechanism considers only build, link, and run dependencies, overlooking test dependencies. As a result, although Spack correctly concretizes environments when `--test root` is specified (including test dependencies), the resulting lockfile dict only includes the deps whose types affect the hash (build/link/run) and when the env is loaded, test dependencies are not, and tests fail. The workaround suggested in the Spack issue [here](https://github.com/spack/spack/issues/29447) is deleting the lockfile every time and allowing `spack install --test root` to recreate it. By extending Spack's default hash type to include test dependencies, the need for this workaround is eliminated and concretization and installation can be split into separate steps.
parent 2bfcc69f
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ def __repr__(self):
#: Spack's deployment hash. Includes all inputs that can affect how a package is built.
dag_hash = SpecHashDescriptor(depflag=dt.BUILD | dt.LINK | dt.RUN, package_hash=True, name="hash")
dag_hash = SpecHashDescriptor(depflag=dt.BUILD | dt.LINK | dt.RUN | dt.TEST, package_hash=True, name="hash")
#: Hash descriptor used only to transfer a DAG, as is, across processes
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment