-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add a unstable --ignore-local-config
flag
#8652
Conversation
r? @Eh2406 (rust_highfive has picked a reviewer for you, use r? to override) |
The |
Thanks, posted #8653 with a fix. |
2e7e076
to
8b87e30
Compare
Thanks! Rebased to rerun CI with your fix. |
The Cargo team discussed this at our meeting, and we think that something of this nature should probably go through the RFC process. There are a number of issues with how Cargo discovers the config files to load, and we don't want to incrementally add small changes that would accumulate to something complex and difficult to work with. The comment at #7894 (comment) contains links to related issues, which would be a good place to start collecting all the different use cases and problems (and the following comments have more detail). Perhaps you and @jsgf could maybe collaborate on that? |
Thanks for your comment! I took a look at the linked issues/proposals and tried to categorize and summarize them: https://internals.rust-lang.org/t/problems-of-cargo-config-files-and-possible-solutions/12987 |
Closing this in favor of #9030 and the proposal in https://internals.rust-lang.org/t/proposal-move-some-cargo-config-settings-to-cargo-toml/13336. An |
This adds a new unstable
--ignore-local-config
flag to all subcommands that makes cargo ignore all.cargo/config
files except for the config file in the user's home directory (similar to the behavior ofcargo install
). This is useful because some config values cannot be reset through command line parameters, e.g. thebuild.target
flag. See #8643 for more motivation.This is the first time that I'm adding new command line parameters to
cargo
, so please let me know if I'm doing something wrong.Fixes #8643