-
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
Implementation and CLI-support for --all-$KIND
flags
#3901
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Awesome thanks for the PR @BenWiederhake! I'm currently traveling but I should be back next week, I'll try to review then. |
Thanks for the heads-up, and no hurry :) |
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.
This looks fantastic to me, thanks so much @BenWiederhake! All I really have is a stylistic nit and a bikeshed :)
@wycats, @carols10cents, @matklad, @brson, thoughts about the flag names here? I might lean toward --tests
instead of --all-tests
, but I'm curious what others think.
src/cargo/ops/cargo_install.rs
Outdated
bins.iter().chain(examples) | ||
.filter_map(|t| check(t)) | ||
.collect() | ||
let all_bins: Vec<String> = bins.try_collect().unwrap_or_else(|| |
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.
Could this use {}
to delimit the closure?
I'll second |
@alexcrichton, re: stylistic nit: ah, yes, those braces belong there. Added. @alexcrichton, @matklad, re: rename: ehh, I personally find @matklad, re: re: readability of diffs: all my new commits can be found at the tip of my branch |
Looks great to me from a technical perspective, thanks again @BenWiederhake! I'll give others some time to weigh in and then we can see how to move forward. |
Ok looks like we don't have too many more opinions, so I'll merge regardless :) Thanks again for the PR @BenWiederhake! @bors: r+ |
📌 Commit 01782fe has been approved by |
Implementation and CLI-support for `--all-$KIND` flags This implements #3112. This means all of the following commands are now possible and meaningful: ``` cargo build --all-bins cargo build --all-tests cargo test --all-tests cargo test --all-bins cargo check --all-bins --all-examples --all-tests --all-benches ``` The commits try to represent the incremental "propagation" of the new feature: - core functionality (`cargo check --lib` passes) - CLI suport (`cargo build` passes) - additional tests (`cargo test` covers new functionality) Note that `--all` is already reserved to mean "all packages of the workspace", so it can't be used to mean `--all-bins --all-examples --all-tests --all-benches`. I intend to follow this up by some other PRs, so please do tell me where I could improve.
☀️ Test successful - status-appveyor, status-travis |
Drop ignored tests r? @alexcrichton These tests are ignored, so its better to remove them. `run` does not supports `--bins` argument, so I've left a single test that checks specifically for this. cc #3901
This implements #3112.
This means all of the following commands are now possible and meaningful:
The commits try to represent the incremental "propagation" of the new feature:
cargo check --lib
passes)cargo build
passes)cargo test
covers new functionality)Note that
--all
is already reserved to mean "all packages of the workspace", so it can't be used to mean--all-bins --all-examples --all-tests --all-benches
.I intend to follow this up by some other PRs, so please do tell me where I could improve.