-
Notifications
You must be signed in to change notification settings - Fork 407
Clean up doc links and enforce them in CI #848
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
Clean up doc links and enforce them in CI #848
Conversation
3d96413
to
1a6becc
Compare
Codecov Report
@@ Coverage Diff @@
## main #848 +/- ##
==========================================
- Coverage 90.66% 90.63% -0.04%
==========================================
Files 51 51
Lines 27135 27135
==========================================
- Hits 24603 24593 -10
- Misses 2532 2542 +10
Continue to review full report at Codecov.
|
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.
Nice! I didn't know this feature was stable.
lightning-block-sync/src/poll.rs
Outdated
@@ -1,3 +1,5 @@ | |||
//! Adapters which make one or more [`BlockSource`]s simpler to poll for new chain tip transitions. |
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.
Will this work given the explanation for using the crate::
prefix in 1e71d32? Likewise in other files.
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.
As long as its imported in a use statement later in the file it seems to work (cargo doc doesn't error, which it now will if it doesnt resolve).
@@ -1187,8 +1181,6 @@ impl<Signer: Sign> ChannelMonitor<Signer> { | |||
|
|||
/// Get the list of HTLCs who's status has been updated on chain. This should be called by | |||
/// ChannelManager via [`chain::Watch::release_pending_monitor_events`]. |
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.
Are parentheses needed here or are they optional? I noticed that you add them elsewhere.
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.
I believe parentheses are only required when the link is ambiguous in some way. cargo doc fails with an ambiguity error in that case.
1a6becc
to
0516b20
Compare
Yea, I think its recent-ish. Certainly newer than a number of the html links in our codebase. |
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.
Compile-time enforcement == happiness
0516b20
to
3b81049
Compare
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.
LGTM but prefer to drop ticks from the right-hand side as noted.
3b81049
to
529af8e
Compare
Addressed comments, happy to squash if @valentinewallace is happy with the changes. |
Not sure if it can be fixed, but FWIW older versions of Rust are giving the following warning:
|
Yea, I'm not aware of a (dependency-free) compile-time change to gate that on the rustc version. Not a huge deal, anyway. |
Relative HTML doc paths in doc links works locally, but breaks on crates.io. Luckily, we can now use explicit full paths and rustdoc will resolve them for us.
529af8e
to
e447131
Compare
Squashed fixup commits with no changes:
|
Also adds some compile-time enforcement of doc links and missing doc fixes.