Repository navigation
Conversation
3 of 6 tasks
## Stabilization report
### What is stabilized
With trim-paths `object` scope and debuginfo on,
Cargo writes `<artifact>.trim-paths.json` beside each final artifact.
The "unremap" file maps the remapped paths back to local ones.
This stabilizes debugger script changes:
`rust-gdb` and `rust-lldb` by default load `{gdb,lldb}_trim_paths.py`,
which read the unremap files and apply them
through GDB `substitute-path` or LLDB `target.source-map`
to set up source file path substitutions.
### What changes
* After stabilization, set `RUST_{GDB,LLDB}_TRIM_PATHS=0` to opt out.
Before, this needed `RUST_{GDB,LLDB}_TRIM_PATHS=unstable`.
* After stabilization, both scripts are shipped on all channels.
Before, they were shipped only on nightly.
### Why we don't want to stabilize
* This makes debugger scripts relying on Cargo-specific file format,
inversing the dependency relation.
* There is no integration test for them.
(and debugger scripts actually don't have many tests)
### Docs
See Cargo's the "Unremap files" section:
<https://github.com/rust-lang/cargo/blob/ac74ae3c603b9efce95b07383b46d3103e834d9a/doc/book/src/reference/profiles.md?plain=1#L337-L386>
weihanglo
force-pushed
the
trim-paths-stabilization
branch
from
October 7, 2026 20:18
31629c6 to
68cc859
Compare
Member
|
Cargo stabilized @rfcbot merge compiler |
Collaborator
|
@Urgau has proposed to merge this. The next step is review by the rest of the tagged team members:
No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
Member
|
cc @Walnut356 (since you may be interested as well) |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stabilization report
What is stabilized
With trim-paths
objectscope and debuginfo on, Cargo writes<artifact>.trim-paths.json1 beside each final artifact. This "unremap" file, maps the remapped paths back to local ones.This stabilizes debugger script changes:
rust-gdbandrust-lldbby default load{gdb,lldb}_trim_paths.py, which read the unremap files and apply them through GDBsubstitute-pathor LLDBtarget.source-mapto set up source file path substitutions.Note that we already apply an unremap for
/rustc/$RUSTC_COMMIT_HASHpaths, so it wouldn't be a new capability per se, just an extension of it.What changes
RUST_{GDB,LLDB}_TRIM_PATHS=0to opt out.Before, it required
RUST_{GDB,LLDB}_TRIM_PATHS=unstableto enable.Before, they were shipped only on nightly.
Why we don't want to stabilize
(and debugger scripts actually don't have many tests)
Docs
See Cargo's the "Unremap files" section:
https://github.com/rust-lang/cargo/blob/ac74ae3c603b9efce95b07383b46d3103e834d9a/doc/book/src/reference/profiles.md?plain=1#L337-L386
Should be shipped after #163881 (or along with that)
Footnotes
Example of the format at: https://github.com/rust-lang/cargo/blob/ac74ae3c603b9efce95b07383b46d3103e834d9a/doc/book/src/reference/profiles.md?plain=1#L367-L381 ↩