Move early exit for setup only argument (#29041)
See https://github.com/spack/spack/pull/28468/files#r809156986 If we exit before generating the: error("Dependencies must have compatible OS's with their dependents"). ... facts we'll output a problem that is effectively different by the one solved by clingo.
This commit is contained in:
parent
1cb82dc542
commit
1ddad522a4
@ -566,10 +566,6 @@ def solve(
|
||||
setup.setup(self, specs)
|
||||
timer.phase("setup")
|
||||
|
||||
# If we're only doing setup, just return an empty solve result
|
||||
if setup_only:
|
||||
return Result(specs)
|
||||
|
||||
# read in the main ASP program and display logic -- these are
|
||||
# handwritten, not generated, so we load them as resources
|
||||
parent_dir = os.path.dirname(__file__)
|
||||
@ -588,6 +584,10 @@ def visit(node):
|
||||
path = os.path.join(parent_dir, 'concretize.lp')
|
||||
parse_files([path], visit)
|
||||
|
||||
# If we're only doing setup, just return an empty solve result
|
||||
if setup_only:
|
||||
return Result(specs)
|
||||
|
||||
# Load the file itself
|
||||
self.control.load(os.path.join(parent_dir, 'concretize.lp'))
|
||||
self.control.load(os.path.join(parent_dir, "display.lp"))
|
||||
|
Loading…
Reference in New Issue
Block a user