ci: Check-docs for all workspace packages#2158
ci: Check-docs for all workspace packages#2158shinigami-777 wants to merge 2 commits intobitcoindevkit:masterfrom
Conversation
|
Thanks for this work. I think it also makes sense to also include the documentation fixes in this PR (as a separate commit). |
|
@shinigami-777 Can you add a commit addressing the check-docs failures? I recommend removing the redundant explicit link targets in |
I have added some doc changes to the |
|
Updated |
oleonardolima
left a comment
There was a problem hiding this comment.
Thanks for working on this one!
I left some comments as I don't see use for a new check-docs.sh file we should probably just call the cargo commands directly. Let's see what other thinks about it.
Also, you could probably squash it into two commits, something like this:
- ci: add new
check-docsjob and recipe in justfile - fix(docs): in
keychain_txout.rsandspk_client.rs
| @@ -57,3 +58,7 @@ _test-testenv: | |||
|
|
|||
| # Run pre-push suite: format, check, and test | |||
| pre-push: fmt check test | |||
There was a problem hiding this comment.
nit: it's also a good idea to add the doc to pre-push too.
ci/check-docs.sh
Outdated
| #!/usr/bin/env bash | ||
|
|
||
| set -e | ||
| RED='\033[0;31m' | ||
| GREEN='\033[0;32m' | ||
| NC='\033[0m' | ||
|
|
||
| echo "Checking documentation for all workspace packages..." | ||
|
|
||
| PACKAGES=( | ||
| "bdk_chain" | ||
| "bdk_core" | ||
| "bdk_file_store" | ||
| "bdk_electrum" | ||
| "bdk_esplora" | ||
| "bdk_bitcoind_rpc" | ||
| "bdk_testenv" | ||
| ) | ||
|
|
||
| FAILED=0 | ||
|
|
||
| for package in "${PACKAGES[@]}"; do | ||
| echo "Checking for ${package}..." | ||
|
|
||
| if RUSTDOCFLAGS='-D warnings' cargo rustdoc -p "${package}" --all-features -- -D warnings; then | ||
| echo -e "${GREEN}✓ ${package} docs OK${NC}" | ||
| else | ||
| echo -e "${RED}✗ ${package} docs FAILED${NC}" | ||
| FAILED=1 | ||
| fi | ||
| echo "" | ||
| done | ||
|
|
||
| if [ $FAILED -eq 1 ]; then | ||
| echo -e "${RED}Documentation check failed for one or more packages${NC}" | ||
| exit 1 | ||
| else | ||
| echo -e "${GREEN}All documentation checks passed!${NC}" | ||
| exit 0 | ||
| fi |
There was a problem hiding this comment.
@shinigami-777 What's the benefit for having this instead of just calling RUSTDOCFLAGS='-D warnings' cargo doc --workspace --no-deps ?
There was a problem hiding this comment.
Removed ci/check-docs.sh. I did the same using RUSTDOCFLAGS='-D warnings' cargo doc --workspace --no-deps.
crates/core/src/spk_client.rs
Outdated
| /// Sync revealed script pubkeys obtained from a | ||
| /// [`KeychainTxOutIndex`](../../bdk_chain/indexer/keychain_txout/struct.KeychainTxOutIndex. | ||
| /// html). | ||
| /// [`KeychainTxOutIndex`](https://docs.rs/bdk_chain/0.23.2/bdk_chain/indexer/keychain_txout/struct.KeychainTxOutIndex.html). |
There was a problem hiding this comment.
nit: it's best to use latest
| /// [`KeychainTxOutIndex`](https://docs.rs/bdk_chain/0.23.2/bdk_chain/indexer/keychain_txout/struct.KeychainTxOutIndex.html). | |
| /// [`KeychainTxOutIndex`](https://docs.rs/bdk_chain/latest/bdk_chain/indexer/keychain_txout/struct.KeychainTxOutIndex.html). |
| override: true | ||
| cache: true | ||
| - name: Check docs | ||
| run: ./ci/check-docs.sh |
There was a problem hiding this comment.
As I mentioned below I don't think we need another file, calling RUSTDOCFLAGS='-D warnings' cargo doc --workspace --no-deps here and in justfile is much better.
There was a problem hiding this comment.
Changed to just calling RUSTDOCFLAGS='-D warnings' cargo doc --workspace --no-deps.
ad4c568 to
c4b8e93
Compare
|
@oleonardolima Thanks for reviewing. I have made the changes and squashed them in 2 commits: c4b8e93 and 1d1e985 |
Description
Issue: #2152
This PR adds a script (
ci/check-docs.sh) that checks documentation builds for all workspace packages. Thecheck-docsjob is added to the workflow filecont_integration.ymlthat calls thecheck-docs.shscript. A justfile recipejust docadded to executeci/check-docs.sh.Notes to the reviewers
Currently the
bdk_chainandbdk_corechecks are failing due to the following errors:Changelog notice
Checklists
All Submissions:
New Features:
Bugfixes: