-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Handle remapped paths correctly when generating "Source" links #150172
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
base: main
Are you sure you want to change the base?
Conversation
|
This comment has been minimized.
This comment has been minimized.
Nevermind, the fix was incomplete. It works fine now. Details |
dfdb113 to
811c241
Compare
| // This is a regression for `--remap-path-prefix` in an auxiliary dependency. | ||
| // | ||
| // We want to make sure that we can still have the "Source" links to the dependency | ||
| // even if it's paths are remapped. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // even if it's paths are remapped. | |
| // even if its paths are remapped. |
Fixes #150100.
This PR fixes a regression introduced by #149709, I was overzealous in my changes (https://github.com/rust-lang/rust/pull/149709/changes#diff-e1cf7ef2fb411d24980cd4cbea1e867cc36029e9496e1ceca64cfb6a0e3510f6) and accidentally changed the behavior of
rustdocin the presence of remapped, to simply reject them instead of handling them.With this PR remapped paths are handled correctly, in a similar way as it was before.
I added a run-make test to make sure we don't regress it again, a simple#150172 (comment)rustdoctest in not sufficient asrustdocis not called on the auxiliary crate. It's not pretty but it works.rustdoc doesn't have any handling for
--remap-path-scope, so I used theMACROscope (it was already used elsewhere.cf. https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/source.20links.20missing.20for.20nightly.20std.20docs
r? @GuillaumeGomez