summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarmen Stoppels <me@harmenstoppels.nl>2024-10-30 12:44:51 +0100
committerGitHub <noreply@github.com>2024-10-30 12:44:51 +0100
commit8bc0b2e0869ba5ba99258fb98615521708ca9e40 (patch)
tree55e0bc26cc78f98785b7c14995e5112363d2754d
parent354615d4918d5ceb42b9477b068ce525c54f9ad9 (diff)
downloadspack-8bc0b2e0869ba5ba99258fb98615521708ca9e40.tar.gz
spack-8bc0b2e0869ba5ba99258fb98615521708ca9e40.tar.bz2
spack-8bc0b2e0869ba5ba99258fb98615521708ca9e40.tar.xz
spack-8bc0b2e0869ba5ba99258fb98615521708ca9e40.zip
Spec.__str__: use full hash (#47322)
The idea is that `spack -e env add ./concrete-spec.json` would list the full hash in the specs, so that (a) it's not ambiguous and (b) it could in principle results in constant time lookup instead of linear time substring match in large build caches.
-rw-r--r--lib/spack/spack/spec.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index fc65dcb64b..e5b9cad431 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -4042,7 +4042,7 @@ class Spec:
def __str__(self):
if self._concrete:
- return self.format("{name}{@version}{/hash:7}")
+ return self.format("{name}{@version}{/hash}")
if not self._dependencies:
return self.format()