chore(nix): read Rust channel from rust-toolchain.toml#2188
Open
worktrunk-bot wants to merge 1 commit intomainfrom
Open
chore(nix): read Rust channel from rust-toolchain.toml#2188worktrunk-bot wants to merge 1 commit intomainfrom
worktrunk-bot wants to merge 1 commit intomainfrom
Conversation
Makes rust-toolchain.toml the single source of truth for the Rust version used by both rustup (CI, local dev) and Nix, eliminating the drift that caused #2185. Also documents the `nix flake update` step in the weekly MSRV bump so the locked rust-overlay stays current with new toolchains. Extensions (rust-src, rust-analyzer) stay in flake.nix since they are only useful in the Nix dev shell — adding them to rust-toolchain.toml would force rustup users and CI to download them too. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Owner
|
(if anyone knows about nix and has a view, please feel free to comment, thanks) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the first two proposals from #2185 (comment):
flake.nixreads the Rust channel fromrust-toolchain.toml— one source of truth for rustup and Nix. The weekly MSRV bump now propagates to the Nix toolchain automatically, turning silent drift into a loud "channel not in locked rust-overlay" error if the lock also falls behind.nix flake update— covers the residual case where a newly pinned channel is newer than the lockedrust-overlayrevision. Theflake.nixrow in the files table is gone since there is nothing to edit there anymore.Extensions (
rust-src,rust-analyzer) stay inflake.nixrather than moving intorust-toolchain.toml— putting them in the toolchain file would force rustup users and CI to download them too, and they are only useful inside the Nix dev shell.Skipped proposal #3 (adding a
nix buildCI job) — that's a bigger change and worth a separate discussion.Test plan
nix build .#worktrunksucceeds (could not verify in CI runner — nonixinstalled)nix develop -c cargo buildsucceedsnix flake checkpasses