summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2024-01-17 17:11:27 -0800
committerGitHub <noreply@github.com>2024-01-17 17:11:27 -0800
commit453ecdb77e5b30b6b42685ea16f3838fb424880c (patch)
treefbce5086e711b7c9e92009a62d6726af49a2800f /etc
parent796d251061b0f222d5b2aa51aada0d5326274df7 (diff)
downloadspack-453ecdb77e5b30b6b42685ea16f3838fb424880c.tar.gz
spack-453ecdb77e5b30b6b42685ea16f3838fb424880c.tar.bz2
spack-453ecdb77e5b30b6b42685ea16f3838fb424880c.tar.xz
spack-453ecdb77e5b30b6b42685ea16f3838fb424880c.zip
Config path quote handling: keys with quotes (#40976)
As observed in #40944, when using `spack config add <path>`, the `path` might contain keys that are enclosed in quotes. This was broken in https://github.com/spack/spack/pull/39831, which assumed that only the value (if present, the final element of the path) would use quotes. This preserves the primary intended behavior of #39931 (allowing ":" in values when using `spack config add`) while also allowing quotes on keys. This has complicated the function `process_config_path`, but: * It is not used outside of `config.py` * The docstring has been updated to account for this * Created an object to formalize the DSL, added a test for that, and refactored parsing to make use of regular expressions as well. * Updated the parsing and also updated the `config_path_dsl` test with an explicit check. At a higher level, split the parsing to check if something is either a key or not: * in the first case, it is covered by a regex * in the second, it may be a YAML value, but in that case it would have to be the last entry of x:y:z, so in that case I attempt to use the YAML handling logic to parse it as such
Diffstat (limited to 'etc')
0 files changed, 0 insertions, 0 deletions