Uh oh!
There was an error while loading. Please reload this page.
[rustdoc] Remove old style files - #56577
Conversation
QuietMisdreavus
commented
Dec 6, 2018
Based on the discussion in #35705 i really doubt we should be getting rid of the redirect pages. cc @rust-lang/rustdoc |
ollie27
commented
Dec 6, 2018
I don't think there's much reason to remove the macro redirects as I don't think many crates have that many macros and we don't want to break existing links. The other redirects aren't old, they're a new style added by #35236. To remove them we would need to update anything generating links of that style like https://github.com/rust-dev-tools/rls-analysis/blob/1e0812e8595b16c086ce9a400b9a50adaf82914b/src/lib.rs#L504-L561. cc. @nrc |
GuillaumeGomez
commented
Dec 7, 2018
They're both useless and take space for nothing. :-/ |
retep998
commented
Dec 7, 2018
I greatly appreciate any reduction in the number of files produced by rustdoc. Killing off redirects will substantially improve doc generation time for |
nrc
commented
Dec 7, 2018
This is not true, they allow linking to rustdoc from tools outside the compiler. Some ways to remove them:
|
ollie27
commented
Dec 7, 2018
@nrc: what tools are using these redirects and how hard would it be for them to generate links using the current URL scheme instead? |
nrc
commented
Dec 7, 2018
RLS, cargo-src, maybe some other stuff
impossible. Basically nobody knows about the |
GuillaumeGomez
commented
Dec 8, 2018
What about I add a flag that'll be disabled by default in order to have those files generated? |
nrc
commented
Dec 9, 2018
As long as the files are there on the hosted rustdoc and docs.rs instances, that seems fine |
GuillaumeGomez
commented
Dec 9, 2018
Ok, I'll do it tomorrow. |
a98637c to
270515dCompareGuillaumeGomez
commented
Dec 11, 2018
I added the option (as stable, if that's an issue, I'll move it as unstable, but considering it allows to generate files that were already here...). |
retep998
commented
Dec 12, 2018
Would it be better to have "redirect" in the name of the flag? |
GuillaumeGomez
commented
Dec 12, 2018
I'm open to changing the name of the flag. No preference on this side. |
QuietMisdreavus
left a comment
There was a problem hiding this comment.
Left some suggestions.
We'll need to remember to coordinate this with docs.rs when this is merged.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
You should either include a test that uses the flag or add it to existing tests that check for these pages.
// compile-flags:--generate-redirect-pagesThere was a problem hiding this comment.
This PR doesn't delete the legacy HTML IDs, does it? Why did you remove it from all these tests?
There was a problem hiding this comment.
I went a bit too strongly on the tests haha.
There was a problem hiding this comment.
Remember to rename this test file if you change the name of the flag.
270515d to
93ac41fCompareGuillaumeGomez
commented
Dec 13, 2018
Updated. |
rust-highfive
commented
Dec 13, 2018
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
93ac41f to
56b0bd5CompareThere was a problem hiding this comment.
This test still should be checking for the HTML IDs.
There was a problem hiding this comment.
Since this one actually checks the content of the redirect pages (and these lines were added in the PR that added the redirect pages in the first place) i feel like this test should also keep them.
QuietMisdreavus
commented
Dec 13, 2018
There's one more place where redirect pages are emitted that you aren't covering in the current PR: |
d44f38f to
56b0bd5CompareQuietMisdreavus
commented
Dec 13, 2018
I take back my last comment. After looking through the code where that's called, it turns out that those redirects are used by rustdoc itself: When an item is defined privately but re-exported publicly, its "canonical" location is still the private one. So any links that get generated to it point to the "private" location in the hierarchy, which are then redirected to the location in My other outstanding review comments still stand though. |
56b0bd5 to
3d339f2Compare
QuietMisdreavus
left a comment
There was a problem hiding this comment.
With the last force-push, looks like we're good to go!
QuietMisdreavus
commented
Dec 14, 2018
@bors r+ |
bors
commented
Dec 14, 2018
📌 Commit 3d339f2 has been approved by |
ollie27
commented
Dec 15, 2018
I don't agree with the macro redirects being controlled by the same flag as the tool redirects. The macro redirects are there for backward compatibility and I'm not aware of any crates with so many macros that their generation is causing problems. If the tool redirects are only to be used on documentation uploaded to Also, doesn't stabilising a new command line option require documentation in the rustdoc book and a FCP? |
QuietMisdreavus
commented
Dec 15, 2018
@bors r- I keep forgetting about the process. I'd forgotten that the flag was insta-stable and forgot about needing documentation for it. The suggestion about being perma-unstable is interesting - @nrc do you know if the tool redirects will be needed for local documentation? If they're not, then it's worth never stabilizing it. |
bors
commented
Dec 23, 2018
☔ The latest upstream changes (presumably #57063) made this pull request unmergeable. Please resolve the merge conflicts. |
Dylan-DPC-zz
commented
Jan 7, 2019
ping from triage @QuietMisdreavus@GuillaumeGomez any updates on this |
GuillaumeGomez
commented
Jan 8, 2019
I need to add a few things. |
TimNN
commented
Jan 22, 2019
Ping from triage! It looks like this PR hasn't made any progress in a while, so I'm closing it as inactive, per our guidelines. Thanks for your contributions, @GuillaumeGomez, and please feel free to re-open in the future. |
…tyle-files, r=ollie27 Rustdoc remove old style files Reopening of rust-lang#56577 (which I can't seem to reopen...). I made the flag unstable so with this change, what was blocking the PR is now gone I assume.
…tyle-files, r=ollie27 Rustdoc remove old style files Reopening of rust-lang#56577 (which I can't seem to reopen...). I made the flag unstable so with this change, what was blocking the PR is now gone I assume.
r? @QuietMisdreavus