Skip to content

Commit 8ba7e72

Browse files
committed
Check documentation building in CI
Now that we split out UniFFI to its own feature, we can make use of the `missing_docs` lint again and enforce it in CI for release docs as well as private items.
1 parent bd9a5ee commit 8ba7e72

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ jobs:
2424
run: cargo build --verbose --color always
2525
- name: Build with UniFFI support on Rust ${{ matrix.toolchain }}
2626
run: cargo build --features uniffi --verbose --color always
27+
- name: Build documentation on Rust ${{ matrix.toolchain }}
28+
run: |
29+
cargo doc --release --verbose --color always
30+
cargo doc --document-private-items --verbose --color always
2731
- name: Check release build on Rust ${{ matrix.toolchain }}
2832
run: cargo check --release --verbose --color always
2933
- name: Check release build with UniFFI support on Rust ${{ matrix.toolchain }}

src/io/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ pub(crate) const LATEST_NODE_ANN_BCAST_TIMESTAMP_KEY: &str = "latest_node_ann_bc
5454
/// Keys and namespaces are required to be valid ASCII strings and the empty namespace (`""`) is
5555
/// assumed to be valid namespace.
5656
pub trait KVStore: KVStorePersister {
57+
/// A reader as returned by [`Self::read`].
5758
type Reader: Read;
5859
/// Returns a [`Read`] for the given `namespace` and `key` from which [`Readable`]s may be
5960
/// read.

src/io/utils.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ use super::KVStore;
3131
/// [`Builder::set_entropy_bip39_mnemonic`].
3232
///
3333
/// [BIP 39]: https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki
34+
/// [`Node`]: crate::Node
3435
/// [`Builder::set_entropy_bip39_mnemonic`]: crate::Builder::set_entropy_bip39_mnemonic
3536
pub fn generate_entropy_mnemonic() -> Mnemonic {
3637
// bip39::Mnemonic supports 256 bit entropy max
@@ -121,7 +122,7 @@ where
121122
})
122123
}
123124

124-
/// Read a previously persisted [`Scorer`] from the store.
125+
/// Read a previously persisted [`ProbabilisticScorer`] from the store.
125126
pub(crate) fn read_scorer<
126127
K: KVStore + Send + Sync,
127128
G: Deref<Target = NetworkGraph<L>>,

src/lib.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,7 @@
6767
//! [`connect_open_channel`]: Node::connect_open_channel
6868
//! [`send_payment`]: Node::send_payment
6969
//!
70-
71-
// We currently disable the missing_docs lint due to incompatibility with the generated Uniffi
72-
// scaffolding.
73-
// TODO: Re-enable after https://github.com/mozilla/uniffi-rs/issues/1502 has been
74-
// addressed.
75-
//#![deny(missing_docs)]
70+
#![cfg_attr(not(feature = "uniffi"), deny(missing_docs))]
7671
#![deny(rustdoc::broken_intra_doc_links)]
7772
#![deny(rustdoc::private_intra_doc_links)]
7873
#![allow(bare_trait_objects)]

0 commit comments

Comments
 (0)