feat(trim-paths): honor workspace prefix override from env by weihanglo · Pull Request #17349 · rust-lang/cargo · GitHub
Skip to content

feat(trim-paths): honor workspace prefix override from env - #17349

Merged
weihanglo merged 2 commits into
rust-lang:masterfrom
weihanglo:trim-paths-ws-prefix
Aug 11, 2026
Merged

feat(trim-paths): honor workspace prefix override from env#17349
weihanglo merged 2 commits into
rust-lang:masterfrom
weihanglo:trim-paths-ws-prefix

Conversation

@weihanglo

@weihanglo weihanglo commented Aug 11, 2026

Copy link
Copy Markdown
Member

What does this PR try to resolve?

__CARGO_RUSTC_BOOTSTRAP_WS_REMAP
is an internal contract with rustc bootstrap,
which needs workspace sources remapped to /rustc/<sha>.

The to prefix participates in the fingerprint,
since it is embedded in artifacts.

See #17309.

How to test and review this PR?

While we can make it a -Z flag,

  • This is modeled after __CARGO_DEFAULT_LIB_METADATA
  • We cannot test this in rust-lang/rust CI without it being at least on one nightly.
    (Maybe there is a way, but I don't know how to set bootstrap cargo to a never built cargo)

Hence I chose the easiest way to implement.

@weihanglo weihanglo added the Z-trim-paths Nightly: path sanitization label Aug 11, 2026
@rustbot rustbot added A-rebuild-detection Area: rebuild detection and fingerprinting S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 11, 2026
@rustbot

rustbot commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Comment thread src/compiler/fingerprint/mod.rs
`__CARGO_RUSTC_BOOTSTRAP_WS_REMAP` will be added in the next commit
in order to support rustc bootstrap's custom remap prefix.
`__CARGO_RUSTC_BOOTSTRAP_WS_REMAP`
is an internal contract with rustc bootstrap,
which needs workspace sources remapped to `/rustc/<sha>`.

The `to` prefix participates in the fingerprint,
since it is embedded in artifacts.

See <rust-lang#17309>.
@weihanglo
weihanglo force-pushed the trim-paths-ws-prefix branch from f0b5e19 to 53f5445 Compare August 11, 2026 03:37
@epage
epage added this pull request to the merge queue Aug 11, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 11, 2026
@weihanglo

Copy link
Copy Markdown
Member Author

@weihanglo
weihanglo added this pull request to the merge queue Aug 11, 2026
Merged via the queue into rust-lang:master with commit eb98b54 Aug 11, 2026
29 checks passed
@weihanglo
weihanglo deleted the trim-paths-ws-prefix branch August 11, 2026 16:38
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 11, 2026
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Aug 11, 2026
Update cargo submodule

10 commits in b07e5a08651da80108eb65d7dc769ee04589f9bf..eb98b54bc9f3c74519f43d066cb3fd02ebc88df0
2026-08-07 21:51:16 +0000 to 2026-08-11 16:00:29 +0000
- feat(trim-paths): honor workspace prefix override from env (rust-lang/cargo#17349)
- fix(clean): respect target with --doc (rust-lang/cargo#17322)
- chore(renovate): Use a 3day minimum release age (rust-lang/cargo#17346)
- test: Handle non-deterministic compilation order (rust-lang/cargo#17347)
- docs(ref): Add missing config env variables (rust-lang/cargo#17345)
- fix(trim-paths): workspace remap under -Zroot-dir (rust-lang/cargo#17337)
- Fix funding link (rust-lang/cargo#17344)
- fix(trim-paths): `/cargo/deps` fallback sources  (rust-lang/cargo#17338)
- doc: don't use mergeable info and json together (rust-lang/cargo#17336)
- docs: document --output-format for cargo doc (rust-lang/cargo#17325)
@rustbot rustbot added this to the 1.99.0 milestone Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rebuild-detection Area: rebuild detection and fingerprinting Z-trim-paths Nightly: path sanitization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants