Skip to content

Pin the cargo-readme version CI installs - #321

Merged
jaemk merged 1 commit into
masterfrom
260828.pin-cargo-readme
Aug 28, 2026
Merged

Pin the cargo-readme version CI installs#321
jaemk merged 1 commit into
masterfrom
260828.pin-cargo-readme

Conversation

@jaemk

@jaemk jaemk commented Aug 28, 2026

Copy link
Copy Markdown
Owner

make check/readme byte-compares the generated README against the committed one, so an unpinned cargo install cargo-readme fails the build whenever cargo-readme changes its output, on a PR whose diff contains nothing to explain it.

That is not hypothetical: 3.4.0 emits plain rust fences and drops the hidden # pub fn main lines 3.3.3 kept, and the fix was a README regeneration with no doc-comment change.

  • Pin the CI install to 3.4.0 with --locked. 3.4.0 is what generated the committed README, so no regeneration is needed here.
  • Point the two documented local-install commands (AGENTS.md, CONTRIBUTING.md) at the same version, since a contributor copying them would otherwise install the latest and produce a README that fails CI.
  • Note the pinned version next to the check/readme target, so it does not take reading the workflow to find.

Moving the pin later is documented in specs/design/0049-pin-cargo-readme.md: regenerate, eyeball the diff, and commit the README with the version bump together so check/readme never sees a mismatch.

`check/readme` byte-compares the generated README, so an unpinned install fails
the build whenever cargo-readme changes its output, with nothing in the diff to
explain it. That has happened once already: 3.4.0 dropped the hidden
`# pub fn main` lines 3.3.3 kept, and the fix was a README regeneration with no
source change.

Pin CI to 3.4.0, which is what generated the committed README, and point the two
documented local-install commands at the same version so a contributor does not
drift onto a newer one.
@jaemk
jaemk merged commit a9a192f into master Aug 28, 2026
2 checks passed
@jaemk
jaemk deleted the 260828.pin-cargo-readme branch August 28, 2026 17:08
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