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
weihanglo
left a comment
There was a problem hiding this comment.
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.
weihanglo
left a comment
There was a problem hiding this comment.
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! |
|
@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 xxxwithout -p flag.Additional information
It has already been released on stable.
rustc 1.65.0 (897e37553 2022-11-02)