Skip to content

Commit

Permalink
Spec.__str__: use full hash (spack#47322)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
haampie authored Oct 30, 2024
1 parent 354615d commit 8bc0b2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/spack/spack/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -4042,7 +4042,7 @@ def format_path(

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()
Expand Down

0 comments on commit 8bc0b2e

Please sign in to comment.