Skip to content

fix(ci): pin the nightly that renders the public-api baselines - #7

Merged
h4x0r merged 2 commits into
mainfrom
fix/pin-public-api-nightly
Aug 4, 2026
Merged

fix(ci): pin the nightly that renders the public-api baselines#7
h4x0r merged 2 commits into
mainfrom
fix/pin-public-api-nightly

Conversation

@h4x0r

@h4x0r h4x0r commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

What was wrong

The workflow pins cargo-public-api to 0.52.0, with a comment saying that keeps
its "textual output format stable across CI runs". On its own it does not.
cargo-public-api renders from rustdoc JSON, so the nightly that produces
that JSON decides the output text as much as the tool version does — and the
nightly was installed unpinned:

run: rustup toolchain install nightly --profile minimal

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 reported a public API change on an API that
had not changed at all:

-pub fn ... -> std::io::error::Result<...>
+pub fn ... -> core::io::error::Result<...>

The fix

Pin the nightly, so both inputs to the rendering are fixed.

Verified rather than assumed: rustc +nightly-2026-05-12 --version reports
1.97.0-nightly (64a965e90 2026-05-11), and regenerating every baseline in this
repo 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-11 would have been the wrong pin. That is
why 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 NIGHTLY from here is a deliberate act
that 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 io types — nothing to re-render — not because their
pinning worked; they were equally exposed to the next rustdoc change.

h4x0r added 2 commits August 3, 2026 02:34
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.
@h4x0r
h4x0r marked this pull request as ready for review August 4, 2026 04:25
@h4x0r
h4x0r merged commit 5e502c2 into main Aug 4, 2026
14 of 15 checks passed
@h4x0r
h4x0r deleted the fix/pin-public-api-nightly branch August 9, 2026 15:28
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