Conversation
.github/workflows/ci.yml
Outdated
| # is a link-checking wrapper around `cargo doc`. | ||
| export RUSTDOCFLAGS="${{ matrix.toolchain == 'nightly' && '-Z unstable-options --document-hidden-items' || '' }} $RUSTDOCFLAGS $METADATA_DOCS_RS_RUSTDOC_ARGS" | ||
| ./cargo.sh +${{ matrix.toolchain }} deadlinks --check-intra-doc-links -- --document-private-items --package ${{ matrix.crate }} ${{ matrix.features }} | ||
| if: matrix.toolchain != 'msrv' |
There was a problem hiding this comment.
Explain why?
Also, I'd recommend just nightly. Runs fewer jobs and the behavior of this is very unlikely to differ by toolchain. Notably, our docs.rs docs are only built from nightly.
There was a problem hiding this comment.
The MSRV of this version of deadlinks is higher than our MSRV.
Restricting to nightly seems reasonable, though.
.github/workflows/ci.yml
Outdated
| # We invoke `cargo deadlinks` instead of `cargo doc`; `cargo deadlinks` | ||
| # is a link-checking wrapper around `cargo doc`. |
61ac2c7 to
2022b0c
Compare
Since `cargo deadlinks` is just a link-checking wrapper around `cargo doc`, we can simply replace our `doc` invocation with `deadlinks` to get the benefits of both.
|
Hm, I can't replicate the issue here locally: https://github.com/google/zerocopy/actions/runs/8159490578/job/22304041953?pr=1021 |
joshlf
left a comment
There was a problem hiding this comment.
Hm, I can't replicate the issue here locally: https://github.com/google/zerocopy/actions/runs/8159490578/job/22304041953?pr=1021
Is it possible that this jq failure is behind it? https://github.com/google/zerocopy/actions/runs/8159490578/job/22304041953?pr=1021#step:16:21
|
|
||
| - name: Check dead links | ||
| run: | | ||
| cargo install -q cargo-deadlinks --version 0.8.1 |
There was a problem hiding this comment.
| cargo install -q cargo-deadlinks --version 0.8.1 | |
| set -eo pipefail | |
| cargo install -q cargo-deadlinks --version 0.8.1 |
And honestly, in other jobs (notably, the previous one) while you're at it. We should have it in every job.
This is a point in favor of landing #1021
Release 0.8.2. This is a point in favor of landing #1021
Release 0.8.2. This is a point in favor of landing #1021
Since
cargo deadlinksis just a link-checking wrapper aroundcargo doc, we can simply replace ourdocinvocation withdeadlinksto get the benefits of both.