summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2024-08-14 18:02:09 +0200
committerGitHub <noreply@github.com>2024-08-14 18:02:09 +0200
commit586a35be4326099734d1c06aaa0360a54020826f (patch)
tree9a24952be0ffd82c8d5347fd77879befb32a628b
parent7a8dc36760f1080497fe22cdb2fd3daf48713ead (diff)
downloadspack-586a35be4326099734d1c06aaa0360a54020826f.tar.gz
spack-586a35be4326099734d1c06aaa0360a54020826f.tar.bz2
spack-586a35be4326099734d1c06aaa0360a54020826f.tar.xz
spack-586a35be4326099734d1c06aaa0360a54020826f.zip
SpecHashDescriptor: better repr in debugger (#45739)
-rw-r--r--lib/spack/spack/hash_types.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/spack/spack/hash_types.py b/lib/spack/spack/hash_types.py
index 0684667528..4b1bf627d6 100644
--- a/lib/spack/spack/hash_types.py
+++ b/lib/spack/spack/hash_types.py
@@ -37,6 +37,12 @@ class SpecHashDescriptor:
"""Run this hash on the provided spec."""
return spec.spec_hash(self)
+ def __repr__(self):
+ return (
+ f"SpecHashDescriptor(depflag={self.depflag!r}, "
+ f"package_hash={self.package_hash!r}, name={self.name!r}, override={self.override!r})"
+ )
+
#: 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")