summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2021-08-02 21:42:56 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2021-11-05 00:15:47 -0700
commit9c70d51a4f011d14f92b7e8576a301060d6bca24 (patch)
tree8ef710674690e5f47ac9d2df0686e6c094005131
parent3866b3e7d38438dd9c7d50b9ee357cc1221b8c50 (diff)
downloadspack-9c70d51a4f011d14f92b7e8576a301060d6bca24.tar.gz
spack-9c70d51a4f011d14f92b7e8576a301060d6bca24.tar.bz2
spack-9c70d51a4f011d14f92b7e8576a301060d6bca24.tar.xz
spack-9c70d51a4f011d14f92b7e8576a301060d6bca24.zip
concretizer: `impose()` for concrete specs should use body facts.
The concretizer doesn't get a say in whether constraints from concrete specs are imposed, so use body facts for them.
-rw-r--r--lib/spack/spack/solver/asp.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index d82d93ff57..040bc23b9a 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -821,9 +821,9 @@ class SpackSolverSetup(object):
return condition_id
- def impose(self, condition_id, imposed_spec, node=True, name=None):
+ def impose(self, condition_id, imposed_spec, node=True, name=None, body=False):
imposed_constraints = self.spec_clauses(
- imposed_spec, body=False, required_from=name)
+ imposed_spec, body=body, required_from=name)
for pred in imposed_constraints:
# imposed "node"-like conditions are no-ops
if not node and pred.name in ("node", "virtual_node"):
@@ -1505,7 +1505,7 @@ class SpackSolverSetup(object):
self.gen.fact(fn.installed_hash(spec.name, h))
# this describes what constraints it imposes on the solve
- self.impose(h, spec)
+ self.impose(h, spec, body=True)
self.gen.newline()
def setup(self, driver, specs, tests=False, reuse=False):