bugfix for error message when input spec does not satisfy concretizer output
Signed-off-by: Gregory Becker <becker33@llnl.gov>
This commit is contained in:
parent
d792121cde
commit
2c43131aca
@ -1090,12 +1090,13 @@ def _handle_solver_bug(
|
||||
stream=out,
|
||||
)
|
||||
if wrong_output:
|
||||
msg = (
|
||||
"internal solver error: the following specs were concretized, but do not satisfy the "
|
||||
"input:\n - "
|
||||
+ "\n - ".join(str(s) for s, _ in wrong_output)
|
||||
+ "\n Please report a bug at https://github.com/spack/spack/issues"
|
||||
)
|
||||
msg = "internal solver error: the following specs were concretized, but do not satisfy "
|
||||
msg += "the input:\n"
|
||||
for in_spec, out_spec in wrong_output:
|
||||
msg += f" - input: {in_spec}\n"
|
||||
msg += f" output: {out_spec.long_spec}\n"
|
||||
msg += "\n Please report a bug at https://github.com/spack/spack/issues"
|
||||
|
||||
# try to write the input/output specs to a temporary directory for bug reports
|
||||
try:
|
||||
tmpdir = tempfile.mkdtemp(prefix="spack-asp-", dir=root)
|
||||
|
@ -81,8 +81,10 @@ def test_internal_error_handling_formatting(tmp_path):
|
||||
assert "the following specs were not solved:\n - baz+z\n" in output
|
||||
assert (
|
||||
"the following specs were concretized, but do not satisfy the input:\n"
|
||||
" - foo+x\n"
|
||||
" - bar+y\n"
|
||||
" - input: foo+x\n"
|
||||
" output: foo@=1.0~x\n"
|
||||
" - input: bar+y\n"
|
||||
" output: x@=1.0~y"
|
||||
) in output
|
||||
|
||||
files = {f.name: str(f) for f in tmp_path.glob("spack-asp-*/*.json")}
|
||||
|
Loading…
Reference in New Issue
Block a user