-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
cargo doc
fails for the h2 crate (v0.1.9) on nightly 2018-06-05
#51468
Comments
This is a regression from stable to nightly. cc @rust-lang/rustdoc |
No it's not, it's a nightly version using a nightly feature (intra-link to exact). |
We've been getting enough of these breaking errors out of the intra-links that i wonder if we should introduce a "rustdoc feature flag" for it. Something like The actual compile error is also a duplicate of #50561. Everything else is just warnings that lead up to that point.` |
Good news: The compile error shown in the issue description was fixed in #50617. Bad news: The $ cargo +nightly rustdoc
Documenting h2 v0.1.10 (file:///home/misdreavus/clones/h2)
error: `[u8]` cannot be resolved, ignoring it...
--> /home/misdreavus/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.4.8/src/lib.rs:21:85
|
21 | //! A `Bytes` handle can be created directly from an existing byte store (such as &[u8]
| ^^ cannot be resolved, ignoring
|
note: lint level defined here
--> src/lib.rs:88:9
|
88 | #![deny(warnings, missing_debug_implementations, missing_docs)]
| ^^^^^^^^
= note: #[deny(intra_doc_link_resolution_failure)] implied by #[deny(warnings)]
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
error: Could not document `h2`. I'm not familiar with the |
@QuietMisdreavus Is there an issue somewhere tracking the the resolution of interactions between |
Why should rustdoc overlook lints/warnings/errors? It seems to be problematic from my point of view. Thanks to it, we were able to find errors while documenting the std so I'd say it's a great thing which was missing. Otherwise I opened a PR to fix the |
@GuillaumeGomez It's a great thing that rustdoc can issue warnings, but it shouldn't block the creation of docs. For an upstream with |
@GuillaumeGomez Because the crate that rustdoc sees is not the same as the crate that rustc sees. Most notably, |
@cramertj: If it blocks compilation, it should block doc generation. @QuietMisdreavus: Yes and we need to fix a few things but that's pretty common for new features. |
@GuillaumeGomez In my case, it does not block compilation. I can build with my transitive dependency on futures_core just fine, it's only when I try to document my crate with its dependencies that cargo doc fails when trying to document futures_core. cargo doc worked as of a few weeks ago and is crucially important to me. I would really appreciate it if some solution were found to let it work again. |
I wonder, now that #51732 is landed, whether we can make cargo cap lints to Allow for dependencies when documenting, like it does for compiling? That would sidestep errors like these where the crate really isn't at fault. I just noticed those lint flags were unstable, though... |
Once #51956 is merged, your problem should be solved. |
I am also running into this issue: I upgraded my toolchain to the latest nightly, and suddenly something in a dependency of a dependency of a dependency has now caused my doc generation to break. I will retry tomorrow when the next nightly is published. |
#51956 has been merged. I'm not clear if that was expected to fix this problem, because I'm still getting failures to build docs due to
|
Still not working with 2018-07-15, but I found that by setting RUSTDOCFLAGS to "--cap-lints allow -Z unstable-options" I can work around it. |
rustdoc: refactor how passes are structured, and turn intra-doc-link collection into a pass This builds on #52751 and should not be merged until that finally finishes the bors queue Part 2 of my passes refactor. This introduces the concept of an "early pass", which is run right before exiting the compiler context. This is important for passes that may want to ask the compiler about things. For example, i took out the intra-doc-link collection and turned it into a early pass. I also made the `strip-hidden`, `strip-private` and `strip-priv-imports` passes occur as early passes, so that intra-doc-link collection wouldn't run on docs that weren't getting printed. Fixes #51684, technically #51468 too but that version of `h2` hits a legit intra-link error after that `>_>` r? @rust-lang/rustdoc
Working now?
|
Seems so! Closing it then. |
The text was updated successfully, but these errors were encountered: