-
Notifications
You must be signed in to change notification settings - Fork 68
doc: fix cargo doc builds when non-default features selected
#129
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
Conversation
|
Looks like MSRV CI isn't pinning |
Pull Request Test Coverage Report for Build 15917138414Details
💛 - Coveralls |
|
I'm updating the pinned deps in #130 if you want to try to build this PR on top of that. |
|
rebased on #130 |
ValuedMammal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 03de52e
notmandatory
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing the docs here. I have a couple suggestions to keep the original intent when the docs are built for docs.rs.
I didn't mean to approve it here, just meant to add my comments.
|
You'll also need to rebase on master now that #130 is merged. Thanks! |
|
Hmm, the nightly //! * `async-https-rustls-manual-roots` enables [`reqwest`], the async client with support for
//! proxying and TLS (SSL) using the `rustls` TLS backend without using its the default root
//! certificates.
-//!
#![cfg_attr(not(feature = "minreq"), doc = "[`minreq`]: https://docs.rs/minreq")]
#![cfg_attr(not(feature = "reqwest"), doc = "[`reqwest`]: https://docs.rs/reqwest")]
#![allow(clippy::result_large_err)]But then $ cargo doc --no-default-features --features=async,tokio
Documenting esplora-client v0.12.0 (/Users/phlip9/dev/esplora-client)
warning: unresolved link to `minreq`
--> src/lib.rs:1:1
|
1 | / //! An extensible blocking/async Esplora client
2 | | //!
3 | | //! This library provides an extensible blocking and
4 | | //! async Esplora client to query Esplora's backend.
... |
65 | | //! certificates.
66 | | #![cfg_attr(not(feature = "minreq"), doc = "[`minreq`]: https://docs.rs/minreq\n")]
| |_________________________________________________________________________________^
|
= note: the link appears in this line:
client using [`minreq`] and an async client using [`reqwest`].
^^^^^^^^
= note: no item named `minreq` in scope
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
= note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default |
|
Nice, got it to work with this dummy link lol ```diff
//! * `async-https-rustls-manual-roots` enables [`reqwest`], the async client with support for
//! proxying and TLS (SSL) using the `rustls` TLS backend without using its the default root
//! certificates.
//!
+//! [`dont remove this line or cargo doc will break`]: https://example.com
#![cfg_attr(not(feature = "minreq"), doc = "[`minreq`]: https://docs.rs/minreq")]
#![cfg_attr(not(feature = "reqwest"), doc = "[`reqwest`]: https://docs.rs/reqwest")]
#![allow(clippy::result_large_err)] |
notmandatory
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 6eece87
Thanks for the quick turnaround and figuring out that dummy link fix.
…lds when non-default features selected
6eece871f422635d66a699a661e64440cc010c4b doc: fix cargo doc builds when non-default features selected (Philip Kannegaard Hayes)
Pull request description:
While upgrading to `v0.12.0` our `cargo doc` builds broke:
```bash
$ cargo doc --no-default-features --features=async,tokio
# ...
error: unresolved link to `minreq`
--> /Users/phlip9/dev/esplora-client/src/lib.rs:54:42
|
54 | //! * `blocking-https-bundled` enables [`minreq`], the blocking client with proxy and TLS (SSL)
| ^^^^^^ no item named `minreq` in scope
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: public documentation for `max_retries` links to private item `RETRYABLE_ERROR_CODES`
--> /Users/phlip9/dev/esplora-client/src/lib.rs:171:21
|
171 | /// is one of [`RETRYABLE_ERROR_CODES`].
| ^^^^^^^^^^^^^^^^^^^^^ this item is private
# ... etc
```
To keep the nice doc links to `minreq` and `reqwest`, I just pointed them to <https://docs.rs/minreq> and <https://docs.rs/reqwest> respectively. It won't resolve to the exact version, but it's better than nothing IMO.
ACKs for top commit:
notmandatory:
ACK 6eece871f422635d66a699a661e64440cc010c4b
Tree-SHA512: fafe24422f41c0360f2138af0ea133c98bf88fcd5b4012a1cf336af51cfb309cfc3f867ce3c061e03519560ac2e90fe20d3b50accaf1bbbfafdfd966c12f1e21
While upgrading to
v0.12.0ourcargo docbuilds broke:To keep the nice doc links to
minreqandreqwest, I just pointed them to https://docs.rs/minreq and https://docs.rs/reqwest respectively. It won't resolve to the exact version, but it's better than nothing IMO.