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

Link to docs.rs environment details from "Build failed" page #923

Closed
Shnatsel opened this issue Jul 31, 2020 · 4 comments
Closed

Link to docs.rs environment details from "Build failed" page #923

Shnatsel opened this issue Jul 31, 2020 · 4 comments
Assignees
Labels
A-frontend Area: Web frontend C-enhancement Category: This is a new feature E-easy Effort: Should be easy to implement and would make a good first PR

Comments

@Shnatsel
Copy link
Member

My crate auditable is doing something quite weird and fails to build on docs.rs. I needed to detect whether it's being built on docs.rs or not to work around the issue. Turns out it's possible and documented here, but that page is not easily discoverable. If "Build failed" page contained either a link to that page or mentioned the DOCS_RS env variable, such situations would be easier to handle.

@jyn514 jyn514 added A-frontend Area: Web frontend C-enhancement Category: This is a new feature E-easy Effort: Should be easy to implement and would make a good first PR labels Jul 31, 2020
@jyn514
Copy link
Member

jyn514 commented Jul 31, 2020

Mentoring instructions: Around

{# Display a warning telling the user we failed to build the docs #}
<div class="warning">
docs.rs failed to build {{ details.name }}-{{ details.version }}<br>Please check the
<a href="/crate/{{ details.name }}/{{ details.version }}/builds">build logs</a> and, if you believe this is
docs.rs' fault, <a href="https://github.com/rust-lang/docs.rs/issues/new/choose">open an issue</a>.
</div>
, add a link to /about and a mention of DOCS_RS=1.

@jyn514 jyn514 self-assigned this Jul 31, 2020
@jyn514
Copy link
Member

jyn514 commented Jul 31, 2020

Actually - what if instead we made an FAQ page for failed builds?

Q: How do I detect docs.rs?
A: DOCS_RS=1

Q: I need a dependency that's not installed.
A: crates-build-env

Q: I need internet access.
A: Sorry, but no.

@jyn514
Copy link
Member

jyn514 commented Jul 31, 2020

I guess at that point we should just fix #888

@Kixiron
Copy link
Member

Kixiron commented Jul 31, 2020

Agreed, those would be fitting things for full-on docs. Chapters I've had ideas for are:

  • Detect docs.rs in build scripts
  • Detect docs.rs in cfg
  • Limits
    • Internet access
  • Need a dependency
  • Badges
  • Redirects
  • Cargo metadata
  • Local testing
  • How do I get my crate on docs.rs (I've seen this question many times)

@jyn514 jyn514 assigned jyn514 and unassigned jyn514 Jul 31, 2020
@jyn514 jyn514 closed this as completed Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Web frontend C-enhancement Category: This is a new feature E-easy Effort: Should be easy to implement and would make a good first PR
Projects
None yet
Development

No branches or pull requests

3 participants