summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGreg Becker <becker33@llnl.gov>2022-05-06 07:23:12 -0700
committerGitHub <noreply@github.com>2022-05-06 16:23:12 +0200
commit27462bc982b10766e75a25539d4b203c16c23d87 (patch)
tree1a5958379f60d567de0e5221101efc6822775119 /lib
parentc2afb4b916940b5feeb4dbdb6eb744e21c84c9da (diff)
downloadspack-27462bc982b10766e75a25539d4b203c16c23d87.tar.gz
spack-27462bc982b10766e75a25539d4b203c16c23d87.tar.bz2
spack-27462bc982b10766e75a25539d4b203c16c23d87.tar.xz
spack-27462bc982b10766e75a25539d4b203c16c23d87.zip
Fix improper type for InvalidDependencyError argument (#30504)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/solver/asp.py2
-rw-r--r--lib/spack/spack/test/cmd/env.py6
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index 52f1b8f67a..363552e782 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -1749,7 +1749,7 @@ class SpackSolverSetup(object):
# Fail if we already know an unreachable node is requested
for spec in specs:
- missing_deps = [d for d in spec.traverse()
+ missing_deps = [str(d) for d in spec.traverse()
if d.name not in possible and not d.virtual]
if missing_deps:
raise spack.spec.InvalidDependencyError(spec.name, missing_deps)
diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py
index 92d4e3031e..35276054aa 100644
--- a/lib/spack/spack/test/cmd/env.py
+++ b/lib/spack/spack/test/cmd/env.py
@@ -1547,8 +1547,10 @@ env:
def test_stack_concretize_extraneous_deps(tmpdir, config, mock_packages):
# FIXME: The new concretizer doesn't handle yet soft
# FIXME: constraints for stacks
- if spack.config.get('config:concretizer') == 'clingo':
- pytest.skip('Clingo concretizer does not support soft constraints')
+ # FIXME: This now works for statically-determinable invalid deps
+ # FIXME: But it still does not work for dynamically determined invalid deps
+ # if spack.config.get('config:concretizer') == 'clingo':
+ # pytest.skip('Clingo concretizer does not support soft constraints')
filename = str(tmpdir.join('spack.yaml'))
with open(filename, 'w') as f: