Skip to content

Fix the external_doc CI error, make the examples no_run#365

Merged
afilini merged 2 commits intobitcoindevkit:masterfrom
afilini:fix/external-doc-feature
Jun 9, 2021
Merged

Fix the external_doc CI error, make the examples no_run#365
afilini merged 2 commits intobitcoindevkit:masterfrom
afilini:fix/external-doc-feature

Conversation

@afilini
Copy link
Member

@afilini afilini commented Jun 9, 2021

Description

This PR fixes the issue we've been having with our CI on nightly runs, since the feature(external_doc) has been removed.

This also finishes the work started in #340 to make sure the CI compiles the examples we have in src/lib.rs.

Notes to the reviewers

This needs to go in before we can make the v0.8.0 release, because otherwise we can't use the CI to test our changes before publishing to crates.io like we do normally.

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

afilini and others added 2 commits June 9, 2021 11:27
It looks like this is now enabled by default as of `cargo 1.54.0-nightly (0cecbd673 2021-06-01)`
We have an attribute `no_run` that builds but does not run example code
in Rustdocs, this keeps the examples building as the codebase evolves.

use `no_run` and fix example code so it builds cleanly during test run.

Some examples that require the `electrum` feature to be available have
been feature-gated to make sure they aren't accidentally compiled when
that feature is not enabled.

Co-authored-by: Alekos Filini <alekos.filini@gmail.com>
Copy link
Member

@RCasatta RCasatta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

just a note, I've seen crates using a generic unstable feature for nightly-only features that may be more generic than test-md-docs if we have other situations where it's useful to avoid features proliferations

@afilini
Copy link
Member Author

afilini commented Jun 9, 2021

Yeah we can consider that in the future if we start adding more and more nightly-only features. I think right now this is the only one we have

@afilini afilini merged commit 3b446c9 into bitcoindevkit:master Jun 9, 2021
@afilini afilini deleted the fix/external-doc-feature branch June 9, 2021 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants