Skip to content

fix(toolchain): build on stable rather than nightly - #266

Merged
forkwright merged 2 commits into
mainfrom
fix/stable-toolchain
Aug 16, 2026
Merged

fix(toolchain): build on stable rather than nightly#266
forkwright merged 2 commits into
mainfrom
fix/stable-toolchain

Conversation

@forkwright

Copy link
Copy Markdown
Owner

Finding

rust-toolchain.toml declared channel = "nightly", which both CI and every local checkout inherit. Nothing in the repo requires it:

  • no #![feature(...)] anywhere under crates/
  • rustfmt.toml declares only edition = "2024" — no nightly-only formatting options
  • no cargo +nightly invocation in any workflow

Meanwhile the consuming workspace, aletheia, pins a stable channel and builds these crates from a git dependency. So the library was being developed and CI'd on a different compiler from the one that actually ships it.

Why it matters beyond tidiness

Nightly moves daily. A library on it can go red from a compiler change with no commit of ours behind it, and this repo's scheduled Security workflow has been failing intermittently — 6 of the last 20 scheduled runs at the time of writing.

It also means a lint regression is indistinguishable from a real defect, because the baseline moves under you.

What the switch actually exposed

Exactly one thing, and it was not a language feature: crates/keryx/src/sse.rs:177 had an inner if inside a match arm that stable's collapsible_match flags and the pinned nightly did not. So the channel was not buying a capability — it was hiding a lint.

Fixed by expressing it as a match guard. Behaviour is unchanged: a NUL-bearing SSE id previously matched the arm and the inner condition skipped the assignment; it now falls through to the ignore arm and is discarded there. Either path discards it, which is what the WHATWG SSE spec requires, and the rationale stays in the comment.

Verification

cargo clippy --workspace --all-targets --keep-going -- -D warnings on the stable toolchain: exit 0, whole workspace.

Done when: CI runs on stable and the scheduled Security workflow's failures, if they persist, can no longer be attributed to compiler churn.

forkwright added 2 commits August 15, 2026 15:26
Nothing here requires nightly: there is no `#![feature(...)]` anywhere in the
crates, and rustfmt.toml declares only `edition = "2024"`. The channel was
nevertheless nightly, which both CI and every local checkout inherited.

That is gratuitous instability for a released library. Nightly moves daily, so
a build can go red from a compiler change with no commit of ours behind it --
and this repo's scheduled Security workflow has been failing intermittently.

Stable also matches the consuming workspace: aletheia pins a stable channel and
builds these crates from a git dependency, so the library was being developed
on a different compiler from the one that ships it.
The nightly channel was hiding one lint: an inner `if` inside a match arm that
stable's collapsible_match flags. Expressed as a match guard instead.

Behaviour is unchanged. A NUL-bearing id previously matched the arm and the
inner condition skipped the assignment; it now falls through to the ignore arm
and is discarded there. Either way the value is not stored, which is what the
WHATWG SSE spec requires.
@forkwright
forkwright merged commit 9906675 into main Aug 16, 2026
10 checks passed
@forkwright
forkwright deleted the fix/stable-toolchain branch August 16, 2026 01:43
forkwright pushed a commit that referenced this pull request Aug 16, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.6.2](v1.6.1...v1.6.2)
(2026-08-16)


### Bug Fixes

* **toolchain:** build on stable rather than nightly
([#266](#266))
([9906675](9906675))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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