Skip to content

docs(tasks): file cargo doc writing the CLI's pages over the library's - #14

Merged
adammharris merged 1 commit into
mainfrom
agent/backlog-cargo-doc-writes-the-cli-over-the-library
Oct 27, 2026
Merged

adammharris merged 1 commit into
mainfrom
agent/backlog-cargo-doc-writes-the-cli-over-the-library

Conversation

@adammharris

Copy link
Copy Markdown
Member

Files a task in docs/tasks/. There is no code change.

What. plates-cli's binary is named plates, the same as the library, so cargo doc --workspace (the Docs job) writes both crates into target/doc/plates/. plates-cli is documented last, so the index there is the CLI's, and none of the library's modules (collect, digest, spec, term, …) are written. Cargo prints warning: output filename collision, but the job passes because RUSTDOCFLAGS='-D warnings' covers rustdoc's warnings and not Cargo's.

Why a task and not a fix. I tried doc = false on the [[bin]]. It removes the collision, but it also drops the binary's own docs. The other route is to move the CLI's modules into a library target with a different name. Choosing between them is a call for Adam, so the task lists both, and also suggests making the Docs job fail on a collision.

Verified. Reproduced at 0ce2fc1 (origin/main) with cargo doc --workspace --all-features --no-deps, and compared target/doc/plates/index.html with plates/src/lib.rs's pub mods. In a scratch checkout, doc = false left target/doc/plates/ holding the library's pages. On this branch, prov check reports no findings and ship ci fmt passes.

@adammharris
adammharris merged commit ff9987d into main Oct 27, 2026
8 checks passed
@adammharris
adammharris deleted the agent/backlog-cargo-doc-writes-the-cli-over-the-library branch October 30, 2026 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant