Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate --remap-path-prefix for diagnostics and debug info #73740

Closed
betamos opened this issue Jun 25, 2020 · 2 comments
Closed

Separate --remap-path-prefix for diagnostics and debug info #73740

betamos opened this issue Jun 25, 2020 · 2 comments
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) A-diagnostics Area: Messages for errors, warnings, and lints A-reproducibility Area: Reproducible / deterministic builds C-feature-request Category: A feature request, i.e: not implemented / a PR. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@betamos
Copy link

betamos commented Jun 25, 2020

Remap source path prefixes in all output, including compiler diagnostics, debug information, macro expansions, etc.

https://doc.rust-lang.org/rustc/command-line-arguments.html#--remap-path-prefix-remap-source-names-in-output

On Fuchsia, we have set up remapping for the purpose of debug info, which creates path relative to the build directory. However, when these paths are printed as part of compiler messages, CWD is usually a different directory, breaking "clickable" file/line references in e.g. VSCode. Thus, we'd benefit from having a separate path remapping for debug info and diagnostics. Perhaps this generalizes to more than these two cases?

@jonas-schievink jonas-schievink added A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-feature-request Category: A feature request, i.e: not implemented / a PR. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 25, 2020
@pcwalton
Copy link
Contributor

I've run into this as an annoyance that cost me about an hour of debugging. An alternative would be to simply print the original, unremapped path alongside the remapped one.

@pcwalton pcwalton added the A-diagnostics Area: Messages for errors, warnings, and lints label Jun 30, 2021
@jyn514 jyn514 added the A-reproducibility Area: Reproducible / deterministic builds label Jun 16, 2023
@Urgau
Copy link
Member

Urgau commented Aug 21, 2024

We now have --remap-path-scope from trim-paths RFC 3127 to distinguishes diagnostics, debug info and more.

Closing in favour of the tracking issue.

@Urgau Urgau closed this as completed Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) A-diagnostics Area: Messages for errors, warnings, and lints A-reproducibility Area: Reproducible / deterministic builds C-feature-request Category: A feature request, i.e: not implemented / a PR. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants