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

rustdoc: use remap-path-prefix #69264

Closed
nmattia opened this issue Feb 18, 2020 · 4 comments · Fixed by #128736
Closed

rustdoc: use remap-path-prefix #69264

nmattia opened this issue Feb 18, 2020 · 4 comments · Fixed by #128736
Labels
C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@nmattia
Copy link

nmattia commented Feb 18, 2020

The rust compiler has an option --remap-path-prefix for remapping path prefixes. It's useful to avoid runtime messages that are independent of where the source code was located during the build.

As far as I can tell that doesn't apply to rustdoc's <meta> info "Source to the Rust file ...", which (to me) is unexpected.

Meta

$ rustc --version --verbose
rustc 1.40.0
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-apple-darwin
release: 1.40.0
LLVM version: 8.0
@nmattia nmattia added the C-bug Category: This is a bug. label Feb 18, 2020
@jonas-schievink jonas-schievink added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Feb 18, 2020
@jyn514
Copy link
Member

jyn514 commented Jul 2, 2021

@jyn514 jyn514 added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Jul 2, 2021
@weihanglo
Copy link
Member

To add one more item to the list, --remap-path-prefix on rustc also applies to diagnostic messages. However, it is not the case on rustdoc. See the zulip topic.

This is found when trying to resolve issues in #111540. I expect rustdoc to match the behavior of rustc.

@weihanglo
Copy link
Member

From Zulip t-rustdoc:

If rustc supports it (and IIUC it seems like it does), then I think we should match rustc in that.
Rustdoc diagnostics should normally behave the same as rustc.

So we kinda get a green light for working on this.

@GuillaumeGomez
Copy link
Member

Taking a look.

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Aug 6, 2024
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Aug 6, 2024
@bors bors closed this as completed in 47a2f14 Aug 7, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Aug 7, 2024
Rollup merge of rust-lang#128736 - GuillaumeGomez:fix-remap-path-prefix, r=notriddle

Fix rustdoc missing handling of remap-path-prefix option

Fixes rust-lang#69264.

cc `@weihanglo`
r? `@notriddle`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants