Unsetting configuration values in deeper configuration files should be possible #10057
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Problem
The Cargo configuration documentation states:
This seems to lead to it being impossible to use deeper configuration directories to un-set values for keys that have been set in ancestors, which seems counter to the documented idea that deeper levels should take presedence.
For example, if
~/.cargo/config.toml
hasthen
~/some-project/.cargo/config.toml
cannot disable source replacement for thecrates-io
source. It could very well change thereplace-with
key's value string to something else than"foo"
, but that doesn't actually disable source replacement. For that, the key would have to be unset.Proposed Solution
If it is indeed desired that deeper configuration files should take presedence (something that seems reasonable), then it should also be possible to unset/undefine keys defined by ancestors. Otherwise this presedence is only partial.
Notes
No response
The text was updated successfully, but these errors were encountered: