Skip to content

Conversation

@0xPoe
Copy link
Member

@0xPoe 0xPoe commented Oct 16, 2025

What does this PR try to resolve?

close #16023

Improve the warning message for realtive install location.

  1. Did a small refactoring to inline GlobalContext::get_path to prevent potential misuse in the future.
  2. Made Cargo always display the absolute install path in warnings.
  3. Added a warning indicating that install.root paths without a trailing backslash will be deprecated in the future.

How to test and review this PR?

Please check the unit test.

r?@ghost

@0xPoe 0xPoe force-pushed the poe-patch-install.root branch 3 times, most recently from daf3b81 to 9e4b6b4 Compare October 27, 2025 20:06
@0xPoe 0xPoe force-pushed the poe-patch-install.root branch 4 times, most recently from b141907 to 7867550 Compare October 29, 2025 20:37
@0xPoe 0xPoe changed the title refactor: inline GlobalContext::get_path fix: display absolute path in the missing in PATH warning Oct 29, 2025
@0xPoe 0xPoe force-pushed the poe-patch-install.root branch from 8995ab9 to 34cc964 Compare November 2, 2025 21:25
@0xPoe 0xPoe marked this pull request as ready for review November 2, 2025 21:25
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 2, 2025
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

  • All tests pass

  • Comments added where necessary

  • Logs added where necessary

  • PR title and description updated

  • Documentation PR created (or confirmed not needed)

  • PR size is reasonable

View changes since this review

@0xPoe 0xPoe force-pushed the poe-patch-install.root branch 3 times, most recently from 080a4e7 to 24904ce Compare November 2, 2025 22:14
@0xPoe 0xPoe requested a review from ehuss November 2, 2025 22:16
@0xPoe 0xPoe force-pushed the poe-patch-install.root branch from 24904ce to fb0690b Compare November 3, 2025 21:08
@rustbot rustbot added the A-configuration Area: cargo config files and env vars label Nov 3, 2025
@0xPoe 0xPoe requested a review from weihanglo November 3, 2025 21:30
@0xPoe 0xPoe force-pushed the poe-patch-install.root branch from cb41a3f to dc89d66 Compare November 3, 2025 21:37
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

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

The final diff looks actually clearer than the commit history. Not sure the history was intended that way, though I feel like we might want a fixup.

Anyway, thanks for fixing this!

View changes since this review

@0xPoe 0xPoe force-pushed the poe-patch-install.root branch 2 times, most recently from 4346e43 to 9980469 Compare November 6, 2025 19:51
@0xPoe 0xPoe force-pushed the poe-patch-install.root branch 5 times, most recently from 877a68e to 01e1c7e Compare November 6, 2025 20:34
@0xPoe 0xPoe force-pushed the poe-patch-install.root branch 2 times, most recently from bcf5166 to 42ae2e4 Compare November 6, 2025 20:43
@0xPoe 0xPoe force-pushed the poe-patch-install.root branch from 42ae2e4 to 35fb192 Compare November 6, 2025 20:44
@0xPoe 0xPoe requested a review from weihanglo November 6, 2025 20:54
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

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

Nice! Thanks a lot for reorganizing commits!

View changes since this review

@weihanglo weihanglo added this pull request to the merge queue Nov 6, 2025
Merged via the queue into rust-lang:master with commit 5854d39 Nov 6, 2025
25 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 6, 2025
@0xPoe 0xPoe deleted the poe-patch-install.root branch November 7, 2025 08:26
bors added a commit to rust-lang/rust that referenced this pull request Nov 8, 2025
Update cargo submodule

22 commits in 6368002885a04cbeae39a82cf5118f941559a40a..445fe4a68f469bf936b2fd81de2c503b233a7f4f
2025-10-31 14:31:52 +0000 to 2025-11-07 18:08:19 +0000
- fix(depinfo): prevent invalid trailing backslash on Windows (rust-lang/cargo#16223)
- refactor: Remove lazycell (rust-lang/cargo#16224)
- refactor: extract ConfigValue to its own module (rust-lang/cargo#16222)
- fix(config): non-mergeable list from cli should take priority (rust-lang/cargo#16220)
- fix(compile): build.warnings=deny shouldn't block hard warnings (rust-lang/cargo#16213)
- fix: display absolute path in the `missing in PATH` warning (rust-lang/cargo#16125)
- fix: non-mergeable list from config cli merge the same way  (rust-lang/cargo#16219)
- docs(contrib): Link out to rustc diagnostic style guide (rust-lang/cargo#16216)
- fix: Remove build-plan (rust-lang/cargo#16212)
- Add native completions for `--package` on various commands (rust-lang/cargo#16210)
- fix(completions): don't wrap completion item help in parenthesis (rust-lang/cargo#16215)
- refactor(locking): Make disabling locking on NFS mounts explicit (rust-lang/cargo#16177)
- docs(unstable): Move compile-time-deps out of Stabilized section (rust-lang/cargo#16211)
- docs(ref): Rename DEP_NAME_KEY to DEP_LINKS_KEY (rust-lang/cargo#16205)
- feat(build-analysis): emit rebuild reason log entry (rust-lang/cargo#16203)
- chore: Update dependencies (rust-lang/cargo#16200)
- chore(deps): update cargo-semver-checks to v0.45.0 (rust-lang/cargo#16190)
- chore(deps): update msrv (rust-lang/cargo#16178)
- refactor: embed deserialize validation logic in ProgressConfig (rust-lang/cargo#16194)
- refactor(gctx): extract config schema to a module (rust-lang/cargo#16195)
- chore: bump to 0.94.0; update changelog (rust-lang/cargo#16191)
- chore(deps): update rust crate gix to 0.74.0 (rust-lang/cargo#16186)

r? ghost
@rustbot rustbot added this to the 1.93.0 milestone Nov 8, 2025
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Nov 10, 2025
Update cargo submodule

22 commits in 6368002885a04cbeae39a82cf5118f941559a40a..445fe4a68f469bf936b2fd81de2c503b233a7f4f
2025-10-31 14:31:52 +0000 to 2025-11-07 18:08:19 +0000
- fix(depinfo): prevent invalid trailing backslash on Windows (rust-lang/cargo#16223)
- refactor: Remove lazycell (rust-lang/cargo#16224)
- refactor: extract ConfigValue to its own module (rust-lang/cargo#16222)
- fix(config): non-mergeable list from cli should take priority (rust-lang/cargo#16220)
- fix(compile): build.warnings=deny shouldn't block hard warnings (rust-lang/cargo#16213)
- fix: display absolute path in the `missing in PATH` warning (rust-lang/cargo#16125)
- fix: non-mergeable list from config cli merge the same way  (rust-lang/cargo#16219)
- docs(contrib): Link out to rustc diagnostic style guide (rust-lang/cargo#16216)
- fix: Remove build-plan (rust-lang/cargo#16212)
- Add native completions for `--package` on various commands (rust-lang/cargo#16210)
- fix(completions): don't wrap completion item help in parenthesis (rust-lang/cargo#16215)
- refactor(locking): Make disabling locking on NFS mounts explicit (rust-lang/cargo#16177)
- docs(unstable): Move compile-time-deps out of Stabilized section (rust-lang/cargo#16211)
- docs(ref): Rename DEP_NAME_KEY to DEP_LINKS_KEY (rust-lang/cargo#16205)
- feat(build-analysis): emit rebuild reason log entry (rust-lang/cargo#16203)
- chore: Update dependencies (rust-lang/cargo#16200)
- chore(deps): update cargo-semver-checks to v0.45.0 (rust-lang/cargo#16190)
- chore(deps): update msrv (rust-lang/cargo#16178)
- refactor: embed deserialize validation logic in ProgressConfig (rust-lang/cargo#16194)
- refactor(gctx): extract config schema to a module (rust-lang/cargo#16195)
- chore: bump to 0.94.0; update changelog (rust-lang/cargo#16191)
- chore(deps): update rust crate gix to 0.74.0 (rust-lang/cargo#16186)

r? ghost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-configuration Area: cargo config files and env vars Command-install

Projects

None yet

Development

Successfully merging this pull request may close these issues.

False positive "be sure to add .local/bin to your PATH" warning with relative install root

4 participants