-
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
With package selection, --package <non-existent> --workspace doesn't warn or error #12978
Comments
@rustbot claim |
@weihanglo looks like #14755 doesnt fix it, i can pick it up |
This below is a test snapshot for current behavior,
IMO, If |
I disagree. The warning would only be about the For myself, I feel like non-existent packages should probably be an error, rather than a warning,. That would be a change in behavior but I think we can chalk it up to a bug. If we feel a transition period is needed, we could start as a warning. |
Yes I agree it.
IMO, I think it would be good to also add this warning |
What are your thoughts on error vs warn?
I'd prefer to discuss changes like that separate from this so we don't get bogged down in details from the other. |
My assumption that But given that this situation was introduced from the start, we can start with warn first. |
@linyihai we talked about this in the Cargo team meeting today and felt there is not likely enough of an impact of fixing this CLI bug to have a gradual transition, preferring instead to make this an error from the beginning. |
That makes sense. I had updated the PR to make this an error |
### What does this PR try to resolve? Fixes #12978 currently, if `--package `and `--workspace` passe in the same time, the `--package` will be ignore even the package doesnt exist in the workspace, this PR regards this behavior as an error ### How should we test and review this PR? one commit add test, one commit fixes the issue. ### Additional information
Problem
Originally reported as nextest-rs/nextest#1108.
With Cargo's package selection, this errors out:
However, this does not error out:
I think this should at least produce a warning and maybe eventually error out.
(I tried searching for issues a bit but I couldn't figure out the right keywords.)
Steps
As above.
Possible Solution(s)
Produce a warning on
--workspace
and-p <non-existent>
. Maybe eventually turn it into an errorNotes
No response
Version
The text was updated successfully, but these errors were encountered: