summaryrefslogtreecommitdiff
path: root/lib/spack/spack/cray_manifest.py
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2023-01-26 10:40:46 +0100
committerGitHub <noreply@github.com>2023-01-26 10:40:46 +0100
commit84917cfa79e29265b387b483d5773b9d20db3ec9 (patch)
tree5eb2b877ce0ddac00c09e79960029d0fe83aa45c /lib/spack/spack/cray_manifest.py
parent14e327be23ff0c4db156409bd8805551bd99e9aa (diff)
downloadspack-84917cfa79e29265b387b483d5773b9d20db3ec9.tar.gz
spack-84917cfa79e29265b387b483d5773b9d20db3ec9.tar.bz2
spack-84917cfa79e29265b387b483d5773b9d20db3ec9.tar.xz
spack-84917cfa79e29265b387b483d5773b9d20db3ec9.zip
Extract functions to read spec files from different format (#35094)
This commit makes explicit the format version of the spec file we are reading from. Before there were different functions capable of reading some part of the spec file at multiple format versions. The decision was implicit, since checks were based on the structure of the JSON without ever checking a format version number. The refactor makes also explicit which spec file format is used by which database and lockfile format, since the information is stored in global mappings. To ensure we don't change the hash of old specs, JSON representations of specs have been added as data. A unit tests checks that we read the correct hash in, and that the hash stays the same when we re-serialize the spec using the most recent format version. Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
Diffstat (limited to 'lib/spack/spack/cray_manifest.py')
-rw-r--r--lib/spack/spack/cray_manifest.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/spack/cray_manifest.py b/lib/spack/spack/cray_manifest.py
index 1f1f5f0ca3..c2908f61be 100644
--- a/lib/spack/spack/cray_manifest.py
+++ b/lib/spack/spack/cray_manifest.py
@@ -162,7 +162,7 @@ def entries_to_specs(entries):
continue
parent_spec = spec_dict[entry["hash"]]
dep_spec = spec_dict[dep_hash]
- parent_spec._add_dependency(dep_spec, deptypes)
+ parent_spec._add_dependency(dep_spec, deptypes=deptypes)
return spec_dict