Skip to content

feat: improve parent workspace search error msg#16669

Merged
epage merged 2 commits intorust-lang:masterfrom
0xPoe:poe-patch-search
Feb 27, 2026
Merged

feat: improve parent workspace search error msg#16669
epage merged 2 commits intorust-lang:masterfrom
0xPoe:poe-patch-search

Conversation

@0xPoe
Copy link
Member

@0xPoe 0xPoe commented Feb 24, 2026

What does this PR try to resolve?

ref #6706 (comment)

I added a message to explain why we search upward and identify the file that caused the issue.

I also included a note to add an empty [workspace] as a workaround.

How to test and review this PR?

Check the unit tests.

r? @ghost

Signed-off-by: 0xPoe <techregister@pm.me>

fix

Signed-off-by: 0xPoe <techregister@pm.me>
@rustbot rustbot added the A-workspaces Area: workspaces label Feb 24, 2026
@0xPoe 0xPoe force-pushed the poe-patch-search branch 2 times, most recently from 57b6a9f to 7b4cfb6 Compare February 25, 2026 09:17
Copy link
Member Author

@0xPoe 0xPoe left a comment

Choose a reason for hiding this comment

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

🔢 Self-check (PR reviewed by myself and ready for feedback)

  • Code compiles successfully

  • Unit tests added

  • No AI-generated elegant nonsense in PR.

  • Comments added where necessary

  • PR title and description updated

  • Documentation PR created (or confirmed not needed)

  • PR size is reasonable

@rustbot ready

View changes since this review

parent directories for a workspace root from `{}`\n\
\n\
Cargo is searching for a workspace in parent directories.\n\
To keep this package out of the parent workspace, add an empty \
Copy link
Member Author

Choose a reason for hiding this comment

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

From current tests, it seems this note is okay, and no false positive cases have been found. However, please let me know if you think this message might be confusing in any other situations.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 25, 2026
@0xPoe 0xPoe marked this pull request as ready for review February 25, 2026 09:20
@0xPoe 0xPoe changed the title NOT READY FOR REVIEW: feat: improve parent workspace search error msg feat: improve parent workspace search error msg Feb 25, 2026
@0xPoe
Copy link
Member Author

0xPoe commented Feb 25, 2026

r? @epage

Signed-off-by: 0xPoe <techregister@pm.me>
@0xPoe 0xPoe requested a review from epage February 27, 2026 09:11
Copy link
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 Feb 27, 2026
Merged via the queue into rust-lang:master with commit 8f1aea1 Feb 27, 2026
29 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 27, 2026
rust-bors bot pushed a commit to rust-lang/rust that referenced this pull request Mar 5, 2026
Update cargo submodule

11 commits in f298b8c82da0cba538516b45b04a480fc501d4c0..708100e0d0fe64ad66e05dc5a19110936a5ca4b1
2026-02-24 21:59:20 +0000 to 2026-03-05 02:03:19 +0000
- Docs: Clarify build script current directory (rust-lang/cargo#16703)
- test(replace): Mark a test as non-deterministic (rust-lang/cargo#16700)
- chore: bump to 0.97.0; update changelog (rust-lang/cargo#16699)
- fix(tests): allow for 'could not' as well as couldn't in test output (rust-lang/cargo#16698)
- chore: Upgrade dependencies (rust-lang/cargo#16690)
- chore(deps): update crate-ci/typos action to v1.44.0 (rust-lang/cargo#16685)
- feat(help): display manpage for nested commands (rust-lang/cargo#16432)
- feat: improve parent workspace search error msg (rust-lang/cargo#16669)
- feat(fix): Inject an edition into scripts (rust-lang/cargo#16678)
- fix(toml): Clarify the edition is on the float (rust-lang/cargo#16676)
- fix(toml): show required rust-version in unstable edition error (rust-lang/cargo#16653)
rust-bors bot pushed a commit to rust-lang/rust that referenced this pull request Mar 5, 2026
Update cargo submodule

12 commits in f298b8c82da0cba538516b45b04a480fc501d4c0..90ed291a50efc459e0c380d7b455777ed41c6799
2026-02-24 21:59:20 +0000 to 2026-03-05 15:11:25 +0000
- test(git): Mark a test as non-deterministic (rust-lang/cargo#16706)
- Docs: Clarify build script current directory (rust-lang/cargo#16703)
- test(replace): Mark a test as non-deterministic (rust-lang/cargo#16700)
- chore: bump to 0.97.0; update changelog (rust-lang/cargo#16699)
- fix(tests): allow for 'could not' as well as couldn't in test output (rust-lang/cargo#16698)
- chore: Upgrade dependencies (rust-lang/cargo#16690)
- chore(deps): update crate-ci/typos action to v1.44.0 (rust-lang/cargo#16685)
- feat(help): display manpage for nested commands (rust-lang/cargo#16432)
- feat: improve parent workspace search error msg (rust-lang/cargo#16669)
- feat(fix): Inject an edition into scripts (rust-lang/cargo#16678)
- fix(toml): Clarify the edition is on the float (rust-lang/cargo#16676)
- fix(toml): show required rust-version in unstable edition error (rust-lang/cargo#16653)
rust-bors bot pushed a commit to rust-lang/rust that referenced this pull request Mar 5, 2026
Update cargo submodule

12 commits in f298b8c82da0cba538516b45b04a480fc501d4c0..90ed291a50efc459e0c380d7b455777ed41c6799
2026-02-24 21:59:20 +0000 to 2026-03-05 15:11:25 +0000
- test(git): Mark a test as non-deterministic (rust-lang/cargo#16706)
- Docs: Clarify build script current directory (rust-lang/cargo#16703)
- test(replace): Mark a test as non-deterministic (rust-lang/cargo#16700)
- chore: bump to 0.97.0; update changelog (rust-lang/cargo#16699)
- fix(tests): allow for 'could not' as well as couldn't in test output (rust-lang/cargo#16698)
- chore: Upgrade dependencies (rust-lang/cargo#16690)
- chore(deps): update crate-ci/typos action to v1.44.0 (rust-lang/cargo#16685)
- feat(help): display manpage for nested commands (rust-lang/cargo#16432)
- feat: improve parent workspace search error msg (rust-lang/cargo#16669)
- feat(fix): Inject an edition into scripts (rust-lang/cargo#16678)
- fix(toml): Clarify the edition is on the float (rust-lang/cargo#16676)
- fix(toml): show required rust-version in unstable edition error (rust-lang/cargo#16653)
rust-bors bot pushed a commit to rust-lang/rust that referenced this pull request Mar 6, 2026
Update cargo submodule



12 commits in f298b8c82da0cba538516b45b04a480fc501d4c0..90ed291a50efc459e0c380d7b455777ed41c6799
2026-02-24 21:59:20 +0000 to 2026-03-05 15:11:25 +0000
- test(git): Mark a test as non-deterministic (rust-lang/cargo#16706)
- Docs: Clarify build script current directory (rust-lang/cargo#16703)
- test(replace): Mark a test as non-deterministic (rust-lang/cargo#16700)
- chore: bump to 0.97.0; update changelog (rust-lang/cargo#16699)
- fix(tests): allow for 'could not' as well as couldn't in test output (rust-lang/cargo#16698)
- chore: Upgrade dependencies (rust-lang/cargo#16690)
- chore(deps): update crate-ci/typos action to v1.44.0 (rust-lang/cargo#16685)
- feat(help): display manpage for nested commands (rust-lang/cargo#16432)
- feat: improve parent workspace search error msg (rust-lang/cargo#16669)
- feat(fix): Inject an edition into scripts (rust-lang/cargo#16678)
- fix(toml): Clarify the edition is on the float (rust-lang/cargo#16676)
- fix(toml): show required rust-version in unstable edition error (rust-lang/cargo#16653)
@rustbot rustbot added this to the 1.96.0 milestone Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-workspaces Area: workspaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants