spack/share/spack/qa
Massimiliano Culpo dbd531112c
Assign priorities to configuration scopes (take 2) (#49187)
Currently, the custom config scopes are pushed at the top when constructing
configuration, and are demoted whenever a context manager activating an
environment is used - see #48414 for details. Workflows that rely on the order
in the [docs](https://spack.readthedocs.io/en/latest/configuration.html#custom-scopes)
are thus fragile, and may break

This PR allows to assign priorities to scopes, and ensures that scopes of lower priorities
are always "below" scopes of higher priorities. When scopes have the same priority,
what matters is the insertion order.

Modifications:
- [x] Add a mapping that iterates over keys according to priorities set when
      adding the key/value pair
- [x] Use that mapping to allow assigning priorities to configuration scopes
- [x] Assign different priorities for different kind of scopes, to fix a bug, and
      add a regression test
- [x] Simplify `Configuration` constructor
- [x] Remove `Configuration.pop_scope`

---------

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-02-26 10:52:19 -08:00
..
configuration warn about removal of deprecated format strings (#34101) 2022-11-28 10:03:49 -08:00
bashcov
completion-test.sh Remove years from license headers (#48352) 2025-01-02 15:40:28 +01:00
config_state.py Remove years from license headers (#48352) 2025-01-02 15:40:28 +01:00
flake8_formatter.py Remove years from license headers (#48352) 2025-01-02 15:40:28 +01:00
run-build-tests Remove years from license headers (#48352) 2025-01-02 15:40:28 +01:00
run-shell-tests Remove years from license headers (#48352) 2025-01-02 15:40:28 +01:00
run-style-tests Remove years from license headers (#48352) 2025-01-02 15:40:28 +01:00
run-unit-tests Fix regression due to dyninst update (#48935) 2025-02-07 10:46:42 +01:00
setup_spack_installer.ps1 Windows: reenable unit tests (#33385) 2022-12-09 13:27:46 +00:00
setup-env-test.csh Remove years from license headers (#48352) 2025-01-02 15:40:28 +01:00
setup-env-test.fish Remove years from license headers (#48352) 2025-01-02 15:40:28 +01:00
setup-env-test.sh Assign priorities to configuration scopes (take 2) (#49187) 2025-02-26 10:52:19 -08:00
setup.sh Remove years from license headers (#48352) 2025-01-02 15:40:28 +01:00
test-env-cfg.sh Remove years from license headers (#48352) 2025-01-02 15:40:28 +01:00
test-framework.sh Remove years from license headers (#48352) 2025-01-02 15:40:28 +01:00
validate_last_exit.ps1 bootstrap ci: add exit code validation for windows (#45221) 2024-07-12 23:07:45 -06:00
vcvarsall.ps1
windows_test_setup.ps1 Hraden Spack's powershell interface (#37079) 2023-04-21 08:58:37 -05:00