Skip to content
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

cargo package -p no-exist emitt error when the -p package not found #13735

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

linyihai
Copy link
Contributor

@linyihai linyihai commented Apr 11, 2024

What does this PR try to resolve?

Fixes #13719

If -p is used, and the spec doesn't match any member, we emit an error like cargo publish -p does.

How should we test and review this PR?

The first commit add a test to show the issue, the next commit add the check logic to fix it.

Additional information

@rustbot
Copy link
Collaborator

rustbot commented Apr 11, 2024

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added Command-package S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 11, 2024
tests/testsuite/package.rs Outdated Show resolved Hide resolved
@linyihai linyihai marked this pull request as ready for review April 12, 2024 03:13
@epage
Copy link
Contributor

epage commented Apr 12, 2024

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 12, 2024

📌 Commit decbadb has been approved by epage

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 12, 2024
@bors
Copy link
Collaborator

bors commented Apr 12, 2024

⌛ Testing commit decbadb with merge 7ac5d58...

@bors
Copy link
Collaborator

bors commented Apr 12, 2024

☀️ Test successful - checks-actions
Approved by: epage
Pushing 7ac5d58 to master...

@bors bors merged commit 7ac5d58 into rust-lang:master Apr 12, 2024
21 checks passed
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 13, 2024
Update cargo

8 commits in 74fd5bc730b828dbc956335b229ac34ba47f7ef7..48eca1b164695022295ce466b64b44e4e0228b08
2024-04-10 18:40:49 +0000 to 2024-04-12 21:16:36 +0000
- test: Remove add/remove death tests (rust-lang/cargo#13750)
- feat(resolve): Fallback to 'rustc -V' for MSRV resolving (rust-lang/cargo#13743)
- feat(cli): Add --ignore-rust-version to update/generate-lockfile (rust-lang/cargo#13742)
- `cargo package -p no-exist` emitt  error when the -p `package` not found (rust-lang/cargo#13735)
- fix(help): Generalize --ignore-rust-version (rust-lang/cargo#13741)
- test: don't compress test registry crates (rust-lang/cargo#13744)
- feat(reslve): Respect '--ignore-rust-version' (rust-lang/cargo#13738)
- refactor: Remove `rust_2024_compatibility` lint group (rust-lang/cargo#13740)

r? ghost
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 13, 2024
Update cargo

8 commits in 74fd5bc730b828dbc956335b229ac34ba47f7ef7..48eca1b164695022295ce466b64b44e4e0228b08
2024-04-10 18:40:49 +0000 to 2024-04-12 21:16:36 +0000
- test: Remove add/remove death tests (rust-lang/cargo#13750)
- feat(resolve): Fallback to 'rustc -V' for MSRV resolving (rust-lang/cargo#13743)
- feat(cli): Add --ignore-rust-version to update/generate-lockfile (rust-lang/cargo#13742)
- `cargo package -p no-exist` emitt  error when the -p `package` not found (rust-lang/cargo#13735)
- fix(help): Generalize --ignore-rust-version (rust-lang/cargo#13741)
- test: don't compress test registry crates (rust-lang/cargo#13744)
- feat(reslve): Respect '--ignore-rust-version' (rust-lang/cargo#13738)
- refactor: Remove `rust_2024_compatibility` lint group (rust-lang/cargo#13740)

r? ghost
@rustbot rustbot added this to the 1.79.0 milestone Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-package S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cargo package --package includes all packages if no match is found
5 participants