Skip to content

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

Closed
@betamos

Description

@betamos

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)A-diagnosticsArea: Messages for errors, warnings, and lintsA-reproducibilityArea: Reproducible / deterministic buildsC-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions