-
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
Provide a way to run cargo subcommands on all crates in the workspace #2878
Comments
Thanks for the issue @euclio! This was indeed intended to have an issue. And to expand a bit the thought was to add
would test all the crates in a workspace, or
would publish all crates in a workspace that haven't already been published. |
just wondering if anyone is still working on this |
@jdc2172 I don't believe the currently is, but if you'd like to take it feel free! |
|
I'd be interested in tackling this, but I think we need to hammer out which commands should get this flag. Also, what sort of implementation approach should be taken? |
|
Cargo test definitely needs this. Not sure cargo build is as high priority given that it already builds path On Fri, Sep 30, 2016, 6:32 PM Steve Klabnik [email protected]
|
Oh yeah. That's what I get for hasty commenting! On my project that uses workspaces, those are the only two sub commands I use, so I didn't think it through 😅😞 On Sep 30, 2016, 18:57 -0400, Jack Crawford [email protected], wrote:
|
@euclio to me yeah |
@alexcrichton Trying to get my feet wet with |
@euclio yeah there's a few points where the |
@alexcrichton How should I handle the ambiguity when the member has the same name as a dependency? |
Oh that's ok, |
Is there a reason not to make It seems like a more reasonable default than the current behavior, which is:
|
@cbiffle perhaps yeah, I figured it'd be good to ask for an explicit |
I've had a PS function function cargoall ([ScriptBlock] $ScriptBlock) {
(cargo metadata --no-deps | ConvertFrom-Json).packages |
%{ ([System.IO.FileInfo] $_.manifest_path).Directory } |
%{
$_.FullName
Push-Location $_
&$ScriptBlock
Pop-Location
}
} (This runs |
|
Add `--all` flag to `cargo test` Work towards #2878. This flag allows a user to test all members of a workspace by using `cargo test --all`. The command is also supported when using a virtual workspace manifest.
@sdroege |
It would be very nice to have |
Indeed, I'll take a look at that tomorrow if nobody else is faster. What other commands would be useful to have with an --all variant? |
Add support for benchmarking all members of a workspace with "bench --all" Same behaviour as "build --all" and others. See #2878 (comment)
Thanks @sdroege! |
This is very applicable to gfx-rs as well, we have dependencies on Windows, OSX, and other stuff, that can't be ON at the same time. |
I created a PR for the |
Add --exclude flag Allows to exclude packages in conjunction with --all. Addresses #2878
Hi, does this issue cover supporting The way the current code looks (to my untrained eyes), each subcommand determines whether or not it supports running against the workspace via the cargo workspace <subcommand> [opts] [args]
# this would run the following against each crate in the workspace:
cargo subcommand [opts] [args] That way any custom subcommands will be able to be run against all crates in the workspace without needing to implement it. |
@azriel91 I'm not currently thinking that we'd have such a subcommand or interpretation of this, it'd be up to subcommands to interpret and act on |
|
A bunch of commands have So I'm closing this! |
Did you fill these issues? |
@gnzlbg that's up to the subcommands (and we probably don't know all of them), at least these subcommands support it:
Another cargo command which I found useful is |
That's good news, 9 days ago clippy and fmt still did not support |
It looks like |
This ugly command tells you what subcommands you have installed have the cargo --list | grep -vF 'Installed' | xargs -I {} bash -c 'echo -n {}: ; cargo {} --help 2>&1 | grep -m 1 "^.\+--all[^-a-z]" || echo' | grep '.\+--all' Sample output:
|
This is mentioned as a "future extension" in RFC 1525.
The text was updated successfully, but these errors were encountered: