Skip to content

ci: pin the rustfmt nightly toolchain - #679

Merged
n13 merged 4 commits into
mainfrom
n13/pin-rustfmt-nightly
Aug 31, 2026
Merged

n13 merged 4 commits into
mainfrom
n13/pin-rustfmt-nightly

Conversation

@n13

@n13 n13 commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #675.

Problem

cargo +nightly fmt in CI uses whatever nightly rustup update resolves that day (rust-toolchain.toml only pins the stable build compiler, and +nightly bypasses it). rustfmt output drifts between nightlies, so formatting that passes on a local nightly fails in CI and vice versa — see the last failed run on #675, where nightly-2026-08-30 re-wrapped trailing comments a January nightly left alone.

Change

  • rustfmt-toolchain holds the pinned nightly (nightly-2026-08-30, the version CI currently resolves; verified 0 diffs on the tree).
  • scripts/fmt.sh reads the pin, installs the toolchain with --profile minimal --component rustfmt if missing, and forwards its arguments to cargo fmt.
  • All fmt call sites go through it: ci.yml, dilithium-publish.yml, miner-api-publish.yml, pm-quality-check.yml, clippy.sh, scripts/pre_checkin_checks.sh, scripts/regenerate_weights.sh, README.
  • The floating-nightly rustfmt install in the ubuntu/macos/windows actions was only there for fmt and is removed.

Bumping

Edit the date in rustfmt-toolchain, run scripts/fmt.sh --all, commit the reformat.

n13 added 3 commits August 31, 2026 10:55
CI resolved the floating nightly channel for cargo fmt, so a newer rustfmt
failed checks that passed on an older local nightly. Pin the date in
rustfmt-toolchain and route every fmt invocation (workflows, local scripts)
through scripts/fmt.sh, which installs the pinned toolchain when missing.
Drop the now-unused floating-nightly rustfmt install from the OS actions.
Base automatically changed from n13/merge-chain-private to main August 31, 2026 03:51
@n13
n13 merged commit 245f55e into main Aug 31, 2026
5 checks passed
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.

2 participants