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.
This commit is contained in:
Harmen Stoppels
2024-10-30 12:44:51 +01:00
committed by GitHub
parent 354615d491
commit 8bc0b2e086

View File

@@ -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()