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: Don't generate empty files for stripped items #34045

Merged
merged 1 commit into from
Jun 12, 2016

Conversation

ollie27
Copy link
Member

@ollie27 ollie27 commented Jun 2, 2016

We need to traverse stripped modules to generate redirect pages, but we shouldn't generate
anything else for them.

This now renders the file contents to a Vec before writing it to a file in one go. I think
that's probably a better strategy anyway.

Fixes: #34025

We need to traverse stripped modules to generate redirect pages, but we shouldn't generate
anything else for them.

This now renders the file contents to a Vec before writing it to a file in one go. I think
that's probably a better strategy anyway.
@rust-highfive
Copy link
Collaborator

r? @cmr

(rust_highfive has picked a reviewer for you, use r? to override)

@GuillaumeGomez
Copy link
Member

Hum... Strange. It doesn't prevent the file creation for #[doc(hidden)] unlike my PR.

@ollie27
Copy link
Member Author

ollie27 commented Jun 2, 2016

It should do, do you have an example where it doesn't?

Files for #[doc(hidden)] should be created if --no-defaults is passed or the item is reexported somewhere public in which case it gets a redirect page.

What currently happens is empty files are created anyway which I believe is what the problem in #34025 is.

@GuillaumeGomez
Copy link
Member

Your solution might be better than mine then. I close my PR in favor of yours. Great job. 😃

@brson
Copy link
Contributor

brson commented Jun 2, 2016

@bors r+ thanks @GuillaumeGomez @ollie27

@bors
Copy link
Contributor

bors commented Jun 2, 2016

📌 Commit cfb4ad2 has been approved by brson

@BenTheElder
Copy link

Thanks all for working on fixing this so quickly!

This looks like it failed due to the LLVM repository being down (#34009), now that #34016 is in perhaps someone could restart travis? :)

@GuillaumeGomez
Copy link
Member

@BenTheElder: No need, bors will test and merge on its own.

@BenTheElder
Copy link

Oh cool :-)
I should have read the contributing guide more thoroughly.
Again, thanks!

On Fri, Jun 3, 2016 at 3:41 PM, Guillaume Gomez notifications@github.com
wrote:

@BenTheElder https://github.com/BenTheElder: No need, bors will test
and merge on its own.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#34045 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AA4Bq4u3o67tPWoqeeGIpTG6RhIe2fFBks5qIINagaJpZM4Iswp3
.

@ollie27
Copy link
Member Author

ollie27 commented Jun 3, 2016

I ran linkchecker after this PR and it looks like I uncovered another rustdoc bug, now getting:

std/char/constant.UNICODE_VERSION.html:50: broken link - rustc_unicode/tables/constant.UNICODE_VERSION.html

I've fixed that in #34068 but assuming bors is gated on linkchecker then this PR won't pass until that is merged. Should I add that commit to this PR if that's easier?

@bors
Copy link
Contributor

bors commented Jun 4, 2016

⌛ Testing commit cfb4ad2 with merge da75ed2...

@bors
Copy link
Contributor

bors commented Jun 4, 2016

💔 Test failed - auto-linux-64-opt-rustbuild

@brson
Copy link
Contributor

brson commented Jun 7, 2016

@ollie27 If you have the patience let's just wait for the other to land.

@ollie27
Copy link
Member Author

ollie27 commented Jun 11, 2016

@brson #34068 has landed so I think this can just be retried?

@alexcrichton
Copy link
Member

@bors: retry

@bors
Copy link
Contributor

bors commented Jun 12, 2016

⌛ Testing commit cfb4ad2 with merge a76698b...

bors added a commit that referenced this pull request Jun 12, 2016
rustdoc: Don't generate empty files for stripped items

We need to traverse stripped modules to generate redirect pages, but we shouldn't generate
anything else for them.

This now renders the file contents to a Vec before writing it to a file in one go. I think
that's probably a better strategy anyway.

Fixes: #34025
@bors bors mentioned this pull request Jun 12, 2016
@bors bors merged commit cfb4ad2 into rust-lang:master Jun 12, 2016
@ollie27 ollie27 deleted the rustdoc_stripped branch June 12, 2016 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants