Conversation
…g list Support all configuration keys and subkeys in `pixi config list [KEY]`. Previously, `partial_config()` in `crates/pixi_cli/src/config.rs` hardcoded a subset of 12 keys and returned an error for valid configuration keys like `tls-root-certs`, `concurrency`, `detached-environments`, `pinning-strategy`, `run-post-link-scripts`, `s3-options`, `tool-platform`, `cache`, `experimental`, and `build`. Furthermore, dotted subkeys were unsupported. This change: - Supports all top-level keys and dotted subkeys in `partial_config`. - Trims/prunes subkey outputs for `concurrency.*` and `s3-options.*` in TOML/JSON. - Uses `config.get_keys()` dynamically for error diagnostics when an invalid key is provided. - Adds `build` to `Config::get_keys()` and deserialization in `Config::set()`. - Adds comprehensive unit tests covering all configuration keys and subkey pruning. Relates to prefix-dev#6825 Signed-off-by: aoright <102943475+aoright@users.noreply.github.com>
aoright
force-pushed
the
fix-config-list-keys
branch
from
September 18, 2026 12:44
8602b6f to
a5309e6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes an inconsistency where running
pixi config list [KEY]failed for valid configuration keys and dotted subkeys (as noted in #6825).Previously,
partial_config()incrates/pixi_cli/src/config.rshardcoded a fixed list of 12 keys, returningkey must be one of: ...for valid configuration keys such astls-root-certs,concurrency,detached-environments,pinning-strategy,run-post-link-scripts,s3-options,tool-platform,cache,experimental, andbuild. Furthermore, dotted subkeys across sections (e.g.cache.conda-packages,concurrency.solves,shell.change-ps1,proxy-config.http,repodata-config.disable-bzip2) were unsupported.Key changes:
partial_config:tls-root-certs,concurrency,detached-environments,pinning-strategy,run-post-link-scripts,s3-options,tool-platform,cache,experimental,build.shell.*,cache.*,proxy-config.*,pypi-config.*,repodata-config.*,index-config.*,experimental.*,concurrency.*, ands3-options.*.prune_subkeysto isolate requested subfields for non-Optionsections likeconcurrency(solvesvsdownloads) ands3-options.<bucket>in both TOML and JSON output.partial_configwithconfig.get_keys()so error diagnostics are dynamically synchronized withConfig."build"toConfig::get_keys()and deserialization inConfig::set().pub source_completion_scripts: Option<bool>onShellConfig.crates/pixi_cli/src/config.rsandcrates/pixi_config/src/lib.rsverifying all supported keys and subkeys.Relates to #6825
How Has This Been Tested?
crates/pixi_cli/src/config.rs:test_partial_config_tls_root_certs: verifiestls-root-certsis preserved.test_partial_config_concurrency: verifiesconcurrencyis preserved.test_partial_config_concurrency_solves: verifiesconcurrency.solvesis isolated in TOML/JSON.test_partial_config_concurrency_downloads: verifiesconcurrency.downloadsis isolated in TOML/JSON.test_partial_config_cache_subkeys: verifiescache.conda-packages.test_partial_config_shell_subkeys: verifiesshell.change-ps1.test_partial_config_proxy_subkeys: verifiesproxy-config.http.test_partial_config_pypi_subkeys: verifiespypi-config.index-url.test_partial_config_repodata_subkeys: verifiesrepodata-config.disable-bzip2.test_partial_config_index_subkeys: verifiesindex-config.base-url.test_partial_config_experimental_subkeys: verifiesexperimental.conda-script.test_partial_config_s3_options: verifiess3-options,s3-options.<bucket>, and subkey pruning.test_partial_config_invalid_key_error: verifies dynamic diagnostic message with all valid keys.test_partial_config_all_supported_keys: exhaustively checks that every key inconfig.get_keys()is accepted bypartial_config().crates/pixi_config/src/lib.rs:test_alter_config: verifiesbuildkey deserialization inConfig::set().cargo test -p pixi_config(64 passed, 0 failed)cargo test -p pixi_cli(203 passed, 0 failed)cargo clippy -p pixi_config -p pixi_cli --all-targets(passed, zero warnings)cargo fmt --check(passed)AI Disclosure
Tools: Claude
Checklist:
schema/model.py.