-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Warnings for breaking changes to the configuration discovery of cargo install
and cargo uninstall
proposed in #11775
#11786
Conversation
…nstall and cargo-uninstall commands
r? @epage (rustbot has picked a reviewer for you, use r? to override) |
Shoot, forgot to run the test suite locally and check if my changes broke any tests |
Seemingly I broke all tests (>50) that run This test broke, for example: cargo/tests/testsuite/install.rs Lines 33 to 58 in e472ccc
because now we have an additional, unexpected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all, I am not sure if everyone in the Cargo team buys in this change. It may or may not change based on the consensus 😞.
Seemingly I broke all tests (>50) that run
cargo install
/cargo uninstall
and check stderr output with.with_stderr
, instead of.with_stderr_contains
I wish we could have turned trivial tests into UI tests style. So that we don't need to update each test manually.
Specifically to this fix, Cargo should strive to be as less verbose as it could (although it is already too verbose), so flushing messages to every user running cargo install
is definitely no-go. I would probably limit the message to users that load configurations from locations other than ~/.cargo/config.toml
. However, I feel even we have shipped this warning, it won't be landed in any near future, as it would highly possibly break a lot of automation processes, especially Docker builds which I've seen they were putting config on /.cargo/config.toml
.
Very interesting. Well, I'll close this PR then, as the changes I've made aren't thought through well enough and I underestimated the complexity of what I was trying to implement. Maybe some other day 🤷♂️ |
#11775 tries to streamline the configuration discovery of
cargo uninstall
withcargo install
and make both more intuitive and in sync with how crate-local configuration discovery works. Unfortunately, these are breaking changes. So this PR adds warning messages tocargo install
andcargo uninstall
, informing the user that the configuration discovery will change in a future version of cargo.