From 27462bc982b10766e75a25539d4b203c16c23d87 Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Fri, 6 May 2022 07:23:12 -0700 Subject: Fix improper type for InvalidDependencyError argument (#30504) --- lib/spack/spack/solver/asp.py | 2 +- lib/spack/spack/test/cmd/env.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'lib') 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: -- cgit v1.2.3-70-g09d2