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: Add support for --remap-path-prefix #107099
base: master
Are you sure you want to change the base?
rustdoc: Add support for --remap-path-prefix #107099
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
f42071a
to
986d0f4
Compare
986d0f4
to
a65e866
Compare
This comment has been minimized.
This comment has been minimized.
6271d23
to
76e5d16
Compare
@rustbot ready |
The code looks good to me, but it comes a bit out of the blue so needs the rustdoc team to agree on it (very likely through FCP). But first, what do you think @rust-lang/rustdoc ? |
tests/run-make/issue-88756-default-output/output-default.stdout
Outdated
Show resolved
Hide resolved
My bad! I didn't think this would be a substantial change since |
76e5d16
to
4bf4e60
Compare
At least opening an issue to explain your needs so it makes it easier for everyone to reach a solution. If this PR ends up being rejected, you'd have worked for nothing. :-/ |
Changes:
|
Got it--I'll be sure to do so in the future. Sorry again, and thank you for the gentle explanation! |
@GuillaumeGomez As far as I can tell from the reference to Buck (which I am familiar with) the point of ---- buck-out/v2/gen/fbcode/882bd00a4ffb1e1d/tracing/stats/__tracing_stats__/__srcs/src/lib.rs - StatsLayer (line 70) stdout ----
error[E0433]: failed to resolve: use of undeclared type `StatsLayer`
--> buck-out/v2/gen/fbcode/882bd00a4ffb1e1d/tracing/stats/__tracing_stats__/__srcs/src/lib.rs:71:13
|
3 | let stats = StatsLayer::new("myservice", 8, false)
| ^^^^^^^^^^ not found in this scope
|
help: consider importing this struct
|
2 | use tracing_stats::StatsLayer;
| The build system would want to use ---- tracing/stats/src/lib.rs - StatsLayer (line 70) stdout ----
error[E0433]: failed to resolve: use of undeclared type `StatsLayer`
--> tracing/stats/src/lib.rs:71:13
|
3 | ... It's a common technique for mature build systems to separate the files that get fed to build steps apart from the files that get touched by the programmers. There are many reasons for this; not all of them apply to every build system that uses this technique.
Edward or I would be happy to elaborate on any of the above if needed. |
tests/run-make/issue-88756-default-output/output-default.stdout
Outdated
Show resolved
Hide resolved
4bf4e60
to
b2d37cf
Compare
☔ The latest upstream changes (presumably #108096) made this pull request unmergeable. Please resolve the merge conflicts. |
@rustbot author |
b2d37cf
to
51c1b4f
Compare
Hey @KittyBorgX, thanks for the ping. Work has been busy, so the conflicts message slipped through the cracks. Rebased and fixed merge conflicts. @rustbot review |
Looks good to me, thanks! Let's start an FCP then. @rfcbot fcp merge |
Team member @GuillaumeGomez has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
What are the "minor adjustments"? Will they in some way affect applying the RFC 3127 changes to rustdoc too? |
I think the minor adjustments phrase is a misnomer. A previous implementation of this required different args to pass to This change can be accurately described as "rustdoc now passes in This shouldn't affect RFC 3127. If the implementation for that RFC is done in |
☔ The latest upstream changes (presumably #114905) made this pull request unmergeable. Please resolve the merge conflicts. |
51c1b4f
to
dc42b59
Compare
This comment has been minimized.
This comment has been minimized.
dc42b59
to
00b1171
Compare
☔ The latest upstream changes (presumably #117875) made this pull request unmergeable. Please resolve the merge conflicts. |
@edward-shen if you can resolve these conflicts we can push this forward for a review. Thanks |
00b1171
to
eb5a731
Compare
@Dylan-DPC, thanks for taking another look at this. I've rebased my changes and ran |
@rustbot review |
☔ The latest upstream changes (presumably #122555) made this pull request unmergeable. Please resolve the merge conflicts. |
Adds --remap-path-prefix as an unstable option. This is implemented to mimic the behavior of rustc's --remap-path-prefix but with minor adjustments. This flag similarly takes in two paths, a prefix to replace and a replacement string.
eb5a731
to
d66718c
Compare
I added it in the next rustdoc meetup agenda to be discussed. |
Adds
--remap-path-prefix
as an unstable option. This is implemented to mimic the behavior ofrustc
's--remap-path-prefix
.This flag similarly takes in two paths, a prefix to replace and a replacement string.
This is useful for build tools (e.g. Buck) other than cargo that can run doc tests.
cc: @dtolnay