spec: return early from concretization if a spec is already concrete (#20196)

This commit is contained in:
Massimiliano Culpo 2020-12-01 18:09:14 +01:00 committed by GitHub
parent b43202f433
commit 7c01ba8fea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2442,6 +2442,9 @@ def _new_concretize(self, tests=False):
raise spack.error.SpecError(
"Spec has no name; cannot concretize an anonymous spec")
if self._concrete:
return
result = spack.solver.asp.solve([self], tests=tests)
if not result.satisfiable:
result.print_cores()