diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2022-02-23 10:46:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-23 01:46:52 -0800 |
commit | 1ddad522a4b1527d337bfface0a62b26b8520347 (patch) | |
tree | dbf03445c299af13c133b43cf698e7d0bf301411 | |
parent | 1cb82dc542b77fda90ac056d2ff9b1dfc06fdff8 (diff) | |
download | spack-1ddad522a4b1527d337bfface0a62b26b8520347.tar.gz spack-1ddad522a4b1527d337bfface0a62b26b8520347.tar.bz2 spack-1ddad522a4b1527d337bfface0a62b26b8520347.tar.xz spack-1ddad522a4b1527d337bfface0a62b26b8520347.zip |
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.
-rw-r--r-- | lib/spack/spack/solver/asp.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index bc26619d6c..4650255271 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -566,10 +566,6 @@ class PyclingoDriver(object): 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 @@ class PyclingoDriver(object): 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")) |