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

docs don't build on docs.rs for 1.0.0-alpha.0 #955

Closed
LLFourn opened this issue Apr 27, 2023 · 3 comments · Fixed by #1011
Closed

docs don't build on docs.rs for 1.0.0-alpha.0 #955

LLFourn opened this issue Apr 27, 2023 · 3 comments · Fixed by #1011
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@LLFourn
Copy link
Contributor

LLFourn commented Apr 27, 2023

See: https://docs.rs/crate/bdk/1.0.0-alpha.0

can we somehow make sure in CI that the docs will build on docs.rs before merging?

@notmandatory notmandatory added the documentation Improvements or additions to documentation label Apr 28, 2023
@notmandatory notmandatory added this to the 1.0.0-alpha.1 milestone Apr 28, 2023
@notmandatory
Copy link
Member

The nightly docs we build in CI are working: https://bitcoindevkit.org/docs-rs/bdk/nightly/latest/bdk/

To troubleshoot why docs.rs docs aren't working we'll need to go through local testing with the docs.rs docker container environment, see: https://github.com/rust-lang/docs.rs/blob/master/README.md

@notmandatory
Copy link
Member

Adding some notes as I go along incase we run into this issue again.

  1. find error page for docs.rs
    https://docs.rs/crate/bdk/1.0.0-alpha.0/builds/771104
  2. replicate errors locally
    cd crates/bdk
    cargo +nightly rustdoc --lib -Zrustdoc-map --all-features -Z unstable-options --config build.rustdocflags='["--cfg", "docsrs", "-Z", "unstable-options", "--emit=invocation-specific", "--resource-suffix", "-20230319-1.70.0-nightly-da7c50c08", "--static-root-path", "/-/rustdoc.static/", "--cap-lints", "warn", "--disable-per-crate-search", "--extern-html-root-takes-precedence"]' -Zunstable-options -Zrustdoc-scrape-examples -j3
    

@notmandatory
Copy link
Member

The problem is we need to enable the doc_cfg feature when the docsrs configuration attribute is defined:

#![cfg_attr(docsrs, feature(doc_cfg))]

Fix in #1011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants