Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please allow to unset configuration items #11973

Closed
glandium opened this issue Apr 14, 2023 · 1 comment
Closed

Please allow to unset configuration items #11973

glandium opened this issue Apr 14, 2023 · 1 comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@glandium
Copy link
Contributor

Problem

When multiple cargo config.tomls are involved, the last one read supersedes the older ones, so if the first sets foo.bar=baz, and the second sets foo.bar=qux, cargo will use qux as the value. This also applies to config-cli, where what is given to the cli is preferred.

But this scheme doesn't allow to unset foo.bar. The best that can apparently be done is to set it to some empty value, but that only works if an empty value has the same semantic meaning as if the value was not set. That's not the case for e.g. source.*.replace-with.

Proposed Solution

No response

Notes

No response

@glandium glandium added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Apr 14, 2023
@weihanglo
Copy link
Member

Thank you for proposing this feature. This is effectively a duplicate as #8687. Closing in favour of that. If something is wrong, please let us know :)

@weihanglo weihanglo closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

No branches or pull requests

2 participants