summaryrefslogtreecommitdiff
path: root/CHANGELOG.md
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2023-12-21 09:06:06 -0800
committerGitHub <noreply@github.com>2023-12-21 09:06:06 -0800
commit0a5f2fc94d7093d57a5f1926f1ebbe035066ad9c (patch)
tree39ef098f7dcf5513795bdf29f085d4fd7284bbb2 /CHANGELOG.md
parent45b2c207dbf6f9ed1b77de01ee15972d5d7014ec (diff)
downloadspack-0a5f2fc94d7093d57a5f1926f1ebbe035066ad9c.tar.gz
spack-0a5f2fc94d7093d57a5f1926f1ebbe035066ad9c.tar.bz2
spack-0a5f2fc94d7093d57a5f1926f1ebbe035066ad9c.tar.xz
spack-0a5f2fc94d7093d57a5f1926f1ebbe035066ad9c.zip
specs: Better error messages for badly quoted specs (#41805)
If you are calling Spack from the python API, you might have written something like this before #41529: ``` find = SpackCommand("find") find('--format={name}', 'saxpy@1.0.0', '+rocm', 'amdgpu_target="gfx90a"') ``` But with the breaking change in #41529, you should write: ``` find = SpackCommand("find") find('--format={name}', 'gromacs', '+rocm', 'amdgpu_target=gfx90a') ``` Note that we don't need quotes in Python strings, and that this is what would come in via argv if you typed a quoted variant on the CLI. The error messages for strings like this are not great -- you get something like this: ``` ==> No package matches the query: gromacs+rocm amdgpu_target="gfx90a" ``` Which doesn't indicate that the issue might be your quoting. This is because we were simply outputting the argv we got, instead of using spec.format() to output the error message. This PR fixes such errors to use `spec.format()` and to look like this: ``` ==> No package matches the query: gromacs+rocm amdgpu_target='"gfx90a"' ``` So users should have an easier time understanding that Spack considers the variant value to contain quotes here. - [x] update ConstraintAction to store parsed Specs - [x] refactor commands to display formatted parsed Specs instead of raw input
Diffstat (limited to 'CHANGELOG.md')
0 files changed, 0 insertions, 0 deletions