Tracking Issue for trim-paths RFC 3127 · Issue #111540 · rust-lang/rust (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
This is a tracking issue for the RFC 3127 (rust-lang/rfcs#3127).
This enhancement adds the --remap-path-scope
command-line flag to control the scoping of how paths get remapped in the resulting binary.
Issues: F-trim-paths Feature: trim-paths
Documentation (rustc): https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/remap-path-scope.html
Documentation (cargo): https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#profile-trim-paths-option
Cargo tracking issue: rust-lang/cargo#12137
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
- Implement the RFC (Implement rustc part of RFC 3127 trim-paths #115214)
- Adjust documentation (see instructions on rustc-dev-guide)
- Stabilization PR (see instructions on rustc-dev-guide)
Unresolved Questions
- Should we use a slightly more complex remapping rule, like distinguishing packages from registry, git and path, as proposed in Enable --remap-path-prefix for absolute paths by default #40552?
- What concerns are there regarding the use of relative paths causing issues with backtraces and debuggers?
- Should we treat the current package the same as other packages?
- Will these cover all potentially embedded paths? Have we missed anything?
- What exactly is the intended use case for the "diagnostics" scope, and when would someone want to turn it on? Is that something someone would really want to enable in cargo? See --remap-path-prefix no longer works for compiler messages #87745.
- Should rustdoc support remapping (like for diagnostics)? Does remapping matter for doctests?
- doctest has supported remapping: Simplify trim-paths feature by merging all debuginfo options together #122450
- rustdoc diagnostics as well: rustdoc: use remap-path-prefix #69264 (comment)
- On Windows PDB hasn't yet got sanitized. See refactor: use Path::push to construct remap-path-prefix cargo#14908.
- Consider the impact of back versus forward slashes, and whether or not that will work with either. See refactor: use Path::push to construct remap-path-prefix cargo#14908 (review)