Skip to content

fix(tree): clarify error message when -i is used without a package name#16818

Merged
epage merged 2 commits intorust-lang:masterfrom
raushan728:fix-8840
Apr 6, 2026
Merged

fix(tree): clarify error message when -i is used without a package name#16818
epage merged 2 commits intorust-lang:masterfrom
raushan728:fix-8840

Conversation

@raushan728
Copy link
Copy Markdown
Contributor

@raushan728 raushan728 commented Apr 1, 2026

View all comments

Fixes #8840

Clarify the error message when -i is used without a package name,
and add tests for both the basic and --workspace cases

@rustbot rustbot added A-cli Area: Command-line interface, option parsing, etc. Command-tree S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 1, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 1, 2026

r? @epage

rustbot has assigned @epage.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ehuss, @epage, @weihanglo
  • @ehuss, @epage, @weihanglo expanded to ehuss, epage, weihanglo
  • Random selection from ehuss, epage, weihanglo

@raushan728 raushan728 closed this Apr 1, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 1, 2026
@raushan728 raushan728 reopened this Apr 1, 2026
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 1, 2026
@epage
Copy link
Copy Markdown
Contributor

epage commented Apr 1, 2026

Note the last comment on #8840 before it was accepted was

The error message definitely could stand some clarification, though.

Similarly, the issue is tagged as a diagnostic issue.

@raushan728 raushan728 changed the title fix(tree): support \--workspace -p <pkg> -i fix(tree): clarify error message when -i is used without a package name Apr 2, 2026
@raushan728
Copy link
Copy Markdown
Contributor Author

Note the last comment on #8840 before it was accepted was

The error message definitely could stand some clarification, though.

Similarly, the issue is tagged as a diagnostic issue.

Understood, updated to only fix the diagnostic.

@raushan728
Copy link
Copy Markdown
Contributor Author

raushan728 commented Apr 4, 2026

Done. Please take a look

@raushan728 raushan728 requested a review from epage April 4, 2026 10:32
Copy link
Copy Markdown
Contributor

@epage epage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@epage epage added this pull request to the merge queue Apr 6, 2026
Merged via the queue into rust-lang:master with commit cc1f24f Apr 6, 2026
29 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 6, 2026
@raushan728 raushan728 deleted the fix-8840 branch April 8, 2026 08:49
rust-bors bot pushed a commit to rust-lang/rust that referenced this pull request Apr 8, 2026
Cargo submodule update

11 commits in a357df4c26fc14514e66aae2a269456b5545c7db..101549dddbd2b08e806f50154e3aa4cb3374cc21
2026-04-03 16:47:15 +0000 to 2026-04-08 12:51:20 +0000
- Never include use extra-filename in build scripts (rust-lang/cargo#16855)
- fix(toml): Force script edition warnings on quiet  (rust-lang/cargo#16848)
- GitHub fast path uses `http_async` (rust-lang/cargo#16847)
- feat(manifest): allow git dependency alongside alternate registry (rust-lang/cargo#16810)
- fix(auth): add auth scheme hint to token rejected error for alt registries (rust-lang/cargo#16794)
- Warn on invalid jobserver file descriptors (rust-lang/cargo#16843)
- docs(unstable): List the minimum required MSRV for 'public' field (rust-lang/cargo#16841)
- feat(lints): Emit unused_dependencies lint (rust-lang/cargo#16600)
- fix(tree): clarify error message when `-i` is used without a package name (rust-lang/cargo#16818)
- fix: Typo in target.&lt;cfg&gt;.linker (rust-lang/cargo#16839)
- Send Content-Type header with cargo publish requests (rust-lang/cargo#16832)

r? ghost
@rustbot rustbot added this to the 1.96.0 milestone Apr 8, 2026
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. Command-tree

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cargo tree -i --workspace doesn't work even if you specify a package

3 participants