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

With package selection, --package <non-existent> --workspace doesn't warn or error #12978

Open
sunshowers opened this issue Nov 14, 2023 · 2 comments · May be fixed by #14755
Open

With package selection, --package <non-existent> --workspace doesn't warn or error #12978

sunshowers opened this issue Nov 14, 2023 · 2 comments · May be fixed by #14755
Assignees
Labels
A-cli Area: Command-line interface, option parsing, etc. C-bug Category: bug S-needs-mentor Status: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.

Comments

@sunshowers
Copy link
Contributor

sunshowers commented Nov 14, 2023

Problem

Originally reported as nextest-rs/nextest#1108.

With Cargo's package selection, this errors out:

$ cargo build --package non-existent
error: package ID specification `non-existent` did not match any packages

However, this does not error out:

$ cargo build --package non-existent --workspace
<build occurs...>

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 error

Notes

No response

Version

% cargo +nightly version --verbose           
cargo 1.76.0-nightly (6790a5127 2023-11-10)
release: 1.76.0-nightly
commit-hash: 6790a5127895debec95c24aefaeb18e059270df3
commit-date: 2023-11-10
host: x86_64-unknown-linux-gnu
libgit2: 1.7.1 (sys:0.18.1 vendored)
libcurl: 8.4.0-DEV (sys:0.4.68+curl-8.4.0 vendored ssl:OpenSSL/1.1.1u)
ssl: OpenSSL 1.1.1u  30 May 2023
os: Pop!_OS 22.04 (jammy) [64-bit]
@sunshowers sunshowers added C-bug Category: bug S-triage Status: This issue is waiting on initial triage. labels Nov 14, 2023
@epage epage added A-cli Area: Command-line interface, option parsing, etc. S-needs-mentor Status: Issue or feature is accepted, but needs a team member to commit to helping and reviewing. and removed S-triage Status: This issue is waiting on initial triage. labels Nov 15, 2023
@MoskalykA
Copy link
Contributor

@rustbot claim

@progressive-galib
Copy link

progressive-galib commented Dec 13, 2024

@weihanglo looks like #14755 doesnt fix it, i can pick it up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area: Command-line interface, option parsing, etc. C-bug Category: bug S-needs-mentor Status: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants