fix(ci): pin the nightly that renders the public-api baselines - #7
Merged
Conversation
The workflow pinned `cargo-public-api` to 0.52.0 with a comment saying that keeps its "textual output format stable across CI runs". It does not, on its own: cargo-public-api renders from rustdoc JSON, so the nightly producing that JSON decides the output text as much as the tool version does -- and the nightly was installed unpinned. A recent nightly moved `io` into `core`, so the renderer began emitting `core::io::error::Error` where the committed baseline says `std::io::error::Error`. The gate went red reporting a public API change on an API that had not changed at all. Pinning nightly-2026-05-12 restores reproducibility. Verified rather than assumed: `rustc +nightly-2026-05-12 --version` is `1.97.0-nightly (64a965e90 2026-05-11)`, and regenerating every baseline in this repo with it diffs against the committed files by zero lines. Note the off-by-one -- rustc reports the commit date, one day behind the toolchain name, so 2026-05-11 would have been the wrong pin. No baseline changes are needed, because the pin selects the toolchain the baselines were generated with. Bumping NIGHTLY from here is a deliberate act that regenerates the baselines in the same commit; moving one without the other is what produced this failure. Fleet-wide: all 10 repos with a public-api workflow floated nightly. Three had already fired; the other seven are green only because their public APIs contain no `io` types, so there was nothing to re-render. This applies the same pin to all of them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
The workflow pins
cargo-public-apito 0.52.0, with a comment saying that keepsits "textual output format stable across CI runs". On its own it does not.
cargo-public-apirenders from rustdoc JSON, so the nightly that producesthat JSON decides the output text as much as the tool version does — and the
nightly was installed unpinned:
A recent nightly moved
iointocore, so the renderer began emittingcore::io::error::Errorwhere the committed baseline saysstd::io::error::Error. The gate reported a public API change on an API thathad not changed at all:
The fix
Pin the nightly, so both inputs to the rendering are fixed.
Verified rather than assumed:
rustc +nightly-2026-05-12 --versionreports1.97.0-nightly (64a965e90 2026-05-11), and regenerating every baseline in thisrepo with that toolchain diffs against the committed files by zero lines.
Note the off-by-one — rustc reports its commit date, one day behind the
toolchain name — so
nightly-2026-05-11would have been the wrong pin. That iswhy the date was checked by installing it, not inferred from
rustc --version.No baseline changes are needed, because the pin selects the toolchain the
baselines were generated with. Bumping
NIGHTLYfrom here is a deliberate actthat regenerates the baselines in the same commit; moving one without the other
is exactly what produced this failure.
Fleet context
All 10 repos with a public-api workflow floated nightly, and all 10 get the
same pin. Three had already fired. The other seven are green only because their
public APIs contain no
iotypes — nothing to re-render — not because theirpinning worked; they were equally exposed to the next rustdoc change.