diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2021-12-23 11:43:55 -0800 |
---|---|---|
committer | Greg Becker <becker33@llnl.gov> | 2022-01-12 06:14:18 -0800 |
commit | 106ae7abe64f021bd151db65f76093c1f9298a78 (patch) | |
tree | 234a48a2d621f99cd1c6845d9cfed59d90fdab60 /etc | |
parent | 39afe946a04ef77c7cafbce9420e7d37cc2ae879 (diff) | |
download | spack-106ae7abe64f021bd151db65f76093c1f9298a78.tar.gz spack-106ae7abe64f021bd151db65f76093c1f9298a78.tar.bz2 spack-106ae7abe64f021bd151db65f76093c1f9298a78.tar.xz spack-106ae7abe64f021bd151db65f76093c1f9298a78.zip |
package_hash: switch to using canonical source instead of AST repr
We are planning to switch to using full hashes for Spack specs, which means that the
package hash will be included in the deployment descriptor. This means we need a more
robust package hash than simply dumping the `repr` of the AST.
The AST repr that we previously used for package content is unreliable because it can
vary between python versions (Python's AST actually changes fairly frequently).
- [x] change `package_hash`, `package_ast`, and `canonical_source` to accept a string for
alternate source instead of a filename.
- [x] consolidate package hash tests in `test/util/package_hash.py`.
- [x] remove old `package_content` method.
- [x] make `package_hash` do what `canonical_source_hash` was doing before.
- [x] modify `content_hash` in `package.py` to use the new `package_hash` function.
Co-authored-by: Danny McClanahan <1305167+cosmicexplorer@users.noreply.github.com>
Diffstat (limited to 'etc')
0 files changed, 0 insertions, 0 deletions