-
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
Add a warning when running cargo test -p
on an optional dependency
#683
Comments
cargo test -p
command doesn't work for optional dependenciescargo test -p
command doesn't work for optional dependencies that are not default
This is currently working as expected, the argument to |
Oh, I need to run Now that you're saying it, that seems logical. |
Yeah, does that seem ok to you? We could possibly run the specification over the entire dependency graph if it's too painful. |
I think that there should at least be some kind of warning. For example searching through the list of features to see if it matches something. |
I'm fine leaving this open to track adding a warning as well (or opening a separate issue on that) |
cargo test -p
command doesn't work for optional dependencies that are not defaultcargo test -p
on an optional dependency
Actually it doesn't work, because I get this message even when I run |
Ah yes that's right, I forgot about that... |
As there hasn't been any activity here in a while would someone (the author, a team member, or any interested party) be able to summarise the current state, perhaps making explicit:
Thank you! (The cargo team is currently evaluating the use of Stale bot, and using #6035 as the tracking issue to gather feedback.) If you're reading this comment from the distant future, fear not if this was closed automatically. If you believe it's still an issue please leave a comment and a team member can reopen this issue. Opening a new issue is also acceptable! |
As I didn't see any updates in 30 days I'm going to close this. Please see the previous comment for more information! |
Example
Cargo.toml
:Running
cargo test -p sub
leads topackage id specification "sub" matched no packages
.Removing
optional = true
or adding[features] default = [ "sub" ]
removes the error.The text was updated successfully, but these errors were encountered: