Repository navigation
Conversation
## 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>
31629c6 to
68cc859
Compare
|
Cargo stabilized @rfcbot merge compiler |
|
@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. |
|
cc @Walnut356 (since you may be interested as well) |
Can someone explain more about this dependency relation? |
|
The change creates a compatibility guarantee for toolchain's debugger support for a format defined by Cargo. "Inverting the dependency relation" may be a too strong word, though. Just now debugger and build tool is coupled to some extent, though for the majority it has net benefit. |
|
It looks like if the file doesn't exist or is not in the format we expect, we'll print a warning message but the debugging experience (loading of visualizers, etc) is otherwise not degraded by the failure. Is that correct? |
This is a silent skip, as trim-paths is off by default for now in Cargo. Changing the default is tracked in rust-lang/cargo#17586.
Yes. Correct. |
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 ↩