feat: add a shared config layer read by all rattler-based tools - #2645
Merged
Conversation
Hofer-Julian
force-pushed
the
shared-config-layer
branch
from
August 5, 2026 14:01
f33e212 to
c16bd74
Compare
This was referenced Aug 5, 2026
Draft
Tools no longer read each other's config files (rattler-build reading `~/.pixi/config.toml` warned about every pixi-only key and leaked pixi settings into builds). Instead there is one shared layer that every rattler-based tool reads: - Shared files live in `/etc/rattler/config.toml` and `$XDG_CONFIG_HOME/rattler/config.toml`. `$RATTLER_HOME/config.toml` is honored when set, without a `~/.rattler` fallback. - Shared files accept only the `CommonConfig` keys. Tool-specific keys warn in every tool, so a shared file means the same thing everywhere. - `locations::config_search_paths` takes a single tool and returns `ConfigLocation`s interleaving both layers: system shared < system tool < user shared < user tool. A path appearing in both layers is parsed as a tool file. - `ConfigBase::load_from_default_locations` takes the tool name; `load_from_locations` merges an explicit list of `ConfigLocation`s.
Hofer-Julian
force-pushed
the
shared-config-layer
branch
from
August 5, 2026 14:25
c16bd74 to
17848a1
Compare
Hofer-Julian
marked this pull request as ready for review
August 5, 2026 14:27
Merged
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.
Currently tools read config files of other tools. So rattler-build loads
~/.pixi/config.tomland then warns about every pixi-only key (shell,detached-environments, ...) and leaks pixi settings likedefault-channelsinto builds (see prefix-dev/rattler-build#2705 for the fallout).This PR replaces tools reading each other's config files with a shared config layer.
Shared layer
/etc/rattler/config.tomland$XDG_CONFIG_HOME/rattler/config.toml. Also$RATTLER_HOME/config.tomlis considered when set.CommonConfigkeys. Anything else warns in every tool, including keys the reading tool's own extension would understand, so a shared file means the same thing to every tool.API changes (breaking)
config_search_paths(&["pixi", "rattler-build"])becomesconfig_search_paths("rattler-build"); the multi-tool cross-reading is gone on purpose.ConfigBase::load_from_default_locationsnow takes the tool nameHow Has This Been Tested?