fix(ci): add rust-toolchain.toml with locked Rust version, use it across all github workflows#215
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
b0f2a05 to
77b1c1f
Compare
77b1c1f to
1968247
Compare
…oss all github workflows
1968247 to
df05368
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df05368e58
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| - name: Read rust-toolchain | ||
| id: rust-version | ||
| run: echo "toolchain=$(yq '.toolchain.channel' rust-toolchain.toml)" >> $GITHUB_OUTPUT |
There was a problem hiding this comment.
Add fallback when rust-toolchain.toml is absent
This publish workflow still supports workflow_dispatch for arbitrary commit_sha values on main (validated only by ancestry), but the new yq '.toolchain.channel' rust-toolchain.toml step assumes that file exists in the checked-out ref. For any historical SHA before this commit introduced rust-toolchain.toml, this command fails and prevents dev releases that previously worked from older commits. Please add a fallback path (for example, defaulting to stable when the file is missing) or read the toolchain file from the workflow revision instead of the target ref.
Useful? React with 👍 / 👎.

TL;DR
Pin the Rust toolchain to a specific version (
1.94.1) across all CI and publish workflows.What changed?
A
rust-toolchain.tomlfile was added to the repository specifying Rust1.95.0as the pinned toolchain channel. All workflow jobs now read this file usingyqbefore installing Rust, passing the resolved version todtolnay/rust-toolchain. Any jobs previously usingactions-rust-lang/setup-rust-toolchain@v1withtoolchain: stablehave been migrated todtolnay/rust-toolchain@stablewith the pinned version.How to test?
Trigger any of the affected CI or publish workflows and verify that the Rust installation step reports version
1.94.1. Confirm that builds, tests, and linting continue to pass as expected.Why make this change?
Using
stablewithout a pinned version means the toolchain can change unexpectedly when Rust releases a new stable version, potentially introducing breaking changes or inconsistent behavior across runs. Pinning to a specific version inrust-toolchain.tomlensures reproducible builds and makes toolchain upgrades an explicit, intentional action.