Skip to content

fix(ci): add rust-toolchain.toml with locked Rust version, use it across all github workflows#215

Merged
Takaros999 merged 1 commit intomainfrom
vladimirburdukov/use-rust-toolchain-version
Apr 20, 2026
Merged

fix(ci): add rust-toolchain.toml with locked Rust version, use it across all github workflows#215
Takaros999 merged 1 commit intomainfrom
vladimirburdukov/use-rust-toolchain-version

Conversation

@chipp
Copy link
Copy Markdown
Contributor

@chipp chipp commented Apr 20, 2026

TL;DR

Pin the Rust toolchain to a specific version (1.94.1) across all CI and publish workflows.

What changed?

A rust-toolchain.toml file was added to the repository specifying Rust 1.95.0 as the pinned toolchain channel. All workflow jobs now read this file using yq before installing Rust, passing the resolved version to dtolnay/rust-toolchain. Any jobs previously using actions-rust-lang/setup-rust-toolchain@v1 with toolchain: stable have been migrated to dtolnay/rust-toolchain@stable with 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 stable without 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 in rust-toolchain.toml ensures reproducible builds and makes toolchain upgrades an explicit, intentional action.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
idkit-js-example Ready Ready Preview, Comment Apr 20, 2026 10:26am

Request Review

@chipp
Copy link
Copy Markdown
Contributor Author

chipp commented Apr 20, 2026

@Takaros999
Copy link
Copy Markdown
Contributor

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@Takaros999 Takaros999 merged commit d00e840 into main Apr 20, 2026
16 checks passed
@Takaros999 Takaros999 deleted the vladimirburdukov/use-rust-toolchain-version branch April 20, 2026 23:34
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