-
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
feat: emit error if package not found within workspace #15071
Conversation
r? @weihanglo rustbot has assigned @weihanglo. Use |
28d534b
to
a407aeb
Compare
a407aeb
to
03b3ca7
Compare
03b3ca7
to
23ab2af
Compare
--package
will be ignore if --workspace
presentsThere 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.
Thanks!
While this turns a success case into an error case, I'm going to go ahead and merge this without an FCP because this was discussed in a Cargo team meeting where we had consensus. This was a bug that we are fixing which limits how much focus we put on compatibility. We are going straight to an error as we feel there is little value gained from a more gradual transition in this case.
If someone does have some concerns, we have nightly and beta to address them.
Update cargo 14 commits in 0e3d73849ab8cbbab3ec5c65cbd555586cb21339..2928e32734b04925ee51e1ae88bea9a83d2fd451 2025-02-01 20:14:40 +0000 to 2025-02-07 16:50:22 +0000 - Simplify backtrack (rust-lang/cargo#15150) - Don't use on Solaris libc::LOCK_* which were removed from libc in ver… (rust-lang/cargo#15143) - feat: emit error if package not found within workspace (rust-lang/cargo#15071) - Make cache tracking resilient to unexpected files (rust-lang/cargo#15147) - Small resolver cleanups (rust-lang/cargo#15040) - feat: add `cargo pkgid` support for cargo-script (rust-lang/cargo#14961) - Suggest similar feature names on CLI (rust-lang/cargo#15133) - fix: Don't use "did you mean" in errors (rust-lang/cargo#15138) - Fix changelog link (rust-lang/cargo#15142) - chore(deps): update rust crate rand to 0.9.0 (rust-lang/cargo#15129) - Remove the original changelog (rust-lang/cargo#15123) - chore(deps): update rust crate gix to 0.70.0 (rust-lang/cargo#15128) - allow windows reserved names in CI (rust-lang/cargo#15135) - removed a word that was repeated (rust-lang/cargo#15136)
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 errorHow should we test and review this PR?
one commit add test, one commit fixes the issue.
Additional information