-
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
Error when precise without -p flag #11349
Conversation
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
r? @weihanglo (rustbot has picked a reviewer for you, use r? to override) |
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
381f9c8
to
71e4dbd
Compare
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.
Looks good!
I saw it landed in the current stable (1.65), just not sure how long the transition period should be. Given people don't run cargo update
daily, do we want to wait one or two more versions?
Anyway, I can bring this to the next triage meeting.
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.
Hello. Cargo team talked about this today. We think it's fine to make it a hard error for --precise
without -p
, as --precise
takes a value that is only meaningful with -p
.
For --aggressive
, we tend not to turn it an error. --aggressive
is more like the default behaviour of cargo update
without any options. We had a debate on whether to keep the warning. We may want to emit a warning like "redundant option --aggressive
. cargo update
without specifying a package implies --aggressive
by default". However, it is a bit lengthy and not really useful. I think it's fine to remove the entire warning and relevant tests as well.
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Make sense. Thanks for bringing this to the meeting! |
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.
Thanks for the update!
@bors r+ |
☀️ Test successful - checks-actions |
In addition, if you have the access of new GitHub code search, here is the search result showing a non-neglectable amount of usage of |
9 commits in e027c4b5d25af2119b1956fac42863b9b3242744..f6e737b1e3386adb89333bf06a01f68a91ac5306 2022-11-25 19:44:46 +0000 to 2022-12-02 20:21:24 +0000 - Refactor generate_targets into separate module (rust-lang/cargo#11445) - Improve file found in multiple build targets warning (rust-lang/cargo#11299) - Error when precise without -p flag (rust-lang/cargo#11349) - Improve strategy for selecting targets to be scraped for examples (rust-lang/cargo#11430) - Aware of compression ratio for unpack size limit (rust-lang/cargo#11337) - Add test for rustdoc-map generation when using sparse registries (rust-lang/cargo#11403) - Add error message when `cargo fix` on an empty repo (rust-lang/cargo#11400) - Store the sparse+ prefix in the SourceId for sparse registries (rust-lang/cargo#11387) - Update documentation for -Zrustdoc-scrape-examples in the Cargo Book (rust-lang/cargo#11425)
Update cargo 9 commits in e027c4b5d25af2119b1956fac42863b9b3242744..f6e737b1e3386adb89333bf06a01f68a91ac5306 2022-11-25 19:44:46 +0000 to 2022-12-02 20:21:24 +0000 - Refactor generate_targets into separate module (rust-lang/cargo#11445) - Improve file found in multiple build targets warning (rust-lang/cargo#11299) - Error when precise without -p flag (rust-lang/cargo#11349) - Improve strategy for selecting targets to be scraped for examples (rust-lang/cargo#11430) - Aware of compression ratio for unpack size limit (rust-lang/cargo#11337) - Add test for rustdoc-map generation when using sparse registries (rust-lang/cargo#11403) - Add error message when `cargo fix` on an empty repo (rust-lang/cargo#11400) - Store the sparse+ prefix in the SourceId for sparse registries (rust-lang/cargo#11387) - Update documentation for -Zrustdoc-scrape-examples in the Cargo Book (rust-lang/cargo#11425)
What does this PR try to resolve?
close #10919
Follow up #10988, see #10919 (comment)
How should we test and review this PR?
You can manually build and test it. You can try
cargo update --precise xxx
without -p flag.Additional information
It has already been released on stable.
rustc 1.65.0 (897e37553 2022-11-02)