Skip to content

redirect from docs.rs/crate-name to crate details if doc build failed #325

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

Merged
merged 1 commit into from
Apr 12, 2019

Conversation

QuietMisdreavus
Copy link
Member

Fixes #232

This PR adds a check to see whether the version being loaded by the crate-docs redirect has docs available. If the rustdoc_status indicates that there are no docs available (whether because the crate is a binary, or the last attempted build failed), then instead of redirecting to the docs page (and immediately hitting an empty 404 page), it redirects to the crate-info page instead.

Currently this doesn't help the question "what is the last version where the docs actually worked" (#226), but this should be a decent quality-of-life improvement nonetheless.

@QuietMisdreavus QuietMisdreavus merged commit a2d4e58 into rust-lang:master Apr 12, 2019
@QuietMisdreavus QuietMisdreavus deleted the redirect-to-crate branch April 12, 2019 18:27
@dpc
Copy link

dpc commented Apr 12, 2019

Thank you @QuietMisdreavus ! Much appreciated. I had at least two people that I tried to convert, hitting this issue.

QuietMisdreavus added a commit to QuietMisdreavus/docs.rs that referenced this pull request Apr 15, 2019
thanks to rust-lang#325 the crate redirector will check that when it pulls the
version info out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants