Skip to content

docs: cargo doc is not run in CI; 31 rustdoc diagnostics have accumulated #257

Description

@mehmetkr-31

Summary

cargo doc is not run anywhere — not in .github/workflows/, not in the Makefile — so rustdoc diagnostics have accumulated unnoticed.

$ grep -c "cargo doc\|rustdoc\|RUSTDOCFLAGS" .github/workflows/ci.yml Makefile
.github/workflows/ci.yml:0
Makefile:0

$ RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --all-features --locked
31 diagnostics across 23 files

The three classes

1. Unresolved intra-doc links (13). Some are prose the parser mistook for links:

/// [<validator>:<voting_power>] given as input to the command.   // crates/quake/src/valset.rs:23
///   load_targets  RPC_NODES  Node names and/or [node_groups]    // crates/quake/src/main.rs:308,314
/// This is used by the #[quake_test] macro                       // crates/quake/src/tests/types.rs:219

Others reference types that are not in scope — ExecutionPayload in crates/evm-node/src/engine.rs:63, FixedBytes in crates/types/src/address.rs:62.

2. Public items linking to private ones (7). PersistedBlockMeter's documentation points at the private SUBSCRIPTION_STATUS_ACTIVE / _CONNECTED / _RECONNECTING constants and the private subscription_status field; fetch_all_metrics points at MAX_CONCURRENT_FETCHES; parse_perf_metrics_delta at display_name_for_scrape; inspect_frame_init at ArcEvm::inspect_frame_init_impl. These render as plain text with no target for anyone reading the public docs.

3. Bare URLs and unclosed HTML tags (11). <timestamp>, <subnet>, <container>, <node> and <mode> placeholders are parsed as HTML tags, and the upstream Reth fork references (crates/evm-node/src/{engine,node,payload}.rs:18, crates/execution-payload/src/payload.rs:382, crates/execution-txpool/src/pool.rs:35, crates/evm/src/executor.rs:90) do not render as links at all.

One is a documentation error, not a link error

Address::repeat_byte is documented as creating a FixedBytes:

/// Creates a new [`FixedBytes`] where all bytes are set to `byte`.
pub const fn repeat_byte(byte: u8) -> Self {

It returns Self. The wording reads as carried over from alloy's own docs for its FixedBytes::repeat_byte.

Suggested fix

Fix all 31 and add a rust-docs job running cargo doc --workspace --no-deps --all-features --locked with RUSTDOCFLAGS: -D warnings, so the same drift cannot recur silently. Opened as #258.

The job is cheap relative to the existing Rust jobs — it is a doc build of the workspace with no dependency docs — and it needs no toolchain beyond what rust-lint already installs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions