summaryrefslogtreecommitdiff
path: root/.coveragerc
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2020-11-02 13:21:11 -0800
committerGitHub <noreply@github.com>2020-11-02 13:21:11 -0800
commitecc3bfd48471035ec260c37e82a045e079addb64 (patch)
tree133d577ef8652285d6ae3920145177491860323f /.coveragerc
parent2ca894bd1ea847d7226c7b4479d26cd645071f4e (diff)
downloadspack-ecc3bfd48471035ec260c37e82a045e079addb64.tar.gz
spack-ecc3bfd48471035ec260c37e82a045e079addb64.tar.bz2
spack-ecc3bfd48471035ec260c37e82a045e079addb64.tar.xz
spack-ecc3bfd48471035ec260c37e82a045e079addb64.zip
Bugfix - hashing: don't recompute full_hash or build_hash (#19672)
There was an error introduced in #19209 where `full_hash()` and `build_hash()` are called on older specs that we've read in from the DB; older specs may not be able to compute these hashes (e.g. if they have removed patches used in computing the full_hash). When serializing a Spec, we want to generate the full/build hash when possible, but we need a mechanism to skip it for Specs that have themselves been read from YAML (and may not support this). To get around this ambiguity and to fix the issue, we: - Add an attribute to the spec called `_hashes_final`, that is `True` if we can't lazily compute `build_hash` and `full_hash`. - Set `_hashes_final` to `False` for new specs (i.e., lazily computing hashes is ok) - Set `_hashes_final` to `True` for concrete specs read in via `from_node_dict`, as it may be too late to recompute hashes. - Compute and write out all hashes in `node_dict_with_hashes` *if possible*. Effectively what this means is that we can round-trip specs that are missing `_build_hash` and `_full_hash` without recomputing them, but for all new specs, we'll compute them and store them. So Spack should work fine with old DBs now.
Diffstat (limited to '.coveragerc')
0 files changed, 0 insertions, 0 deletions