-
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
Apply --all if workspace is virtual #4025
Apply --all if workspace is virtual #4025
Conversation
Should help close rust-lang#4021
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! Could you also add some tests for this as well? |
Will do this evening (GMT+1/2) |
I've fixed one test that failed because the virtual build was supposed to fail before this PR. However, I don't really see a way of testing the modification appart from trying to run cargo with a virtual build and verify it returns with a status 0. Is that actually all that's testable? |
|
Thanks for the pointer @matklad Won't have time this week-end, but will be back on it next week! |
I think I've got this. I copied existing tests for virtual workspace, and removed the What do you think? |
|
||
let spec = if options.flag_all { | ||
let spec = if options.flag_all || ws.is_virtual() { |
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.
Hm, won't this break a use case when you are in the root of the workspace, but want to exercise a particular package?
I am thinking about something like this:
ws_root/
Cargo.toml
foo/
Cargo.toml
bar/
Cargo.toml
$ pwd
~/projects/ws_root/
$ cargo test --pkg foo
If I am right, and the tests are green, this also means that some test is missing :)
☔ The latest upstream changes (presumably #4031) made this pull request unmergeable. Please resolve the merge conflicts. |
Closing due to inactivity, but please feel free to resubmit with a rebase! |
Rebased and fixed 4025: Apply --all if workspace is virtual - fixes #4021 - rebased #4025 - fixed issue issue described by @matklad in #4025 (review) - added test `build_virtual_manifest_one_project` which covers the fix
No description provided.