pin Rust toolchain to 1.95.0 for deterministic rustfmt#26
Merged
Conversation
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
Adds
rust-toolchain.tomlpinning to Rust 1.95.0 (rustfmt 1.9.0-stable, released 2026-04-14).Why
dprint's exec plugin shells out to
rustfmt --edition 2024for.rsfiles. Without a pinned toolchain, both CI (ubuntu-latest's bundled Rust) and contributors run whatever rustfmt is on PATH. Different rustfmt builds emit different layouts for the same input -- e.g., let-chainif let Some(_) = expr { ... }gets formatted as one line by some versions and two lines (brace on its own line) by others. That surfaced in #22 as adprint checkfailure ontaurpc/src/export.rseven though the contributor's local rustfmt was happy with their formatting.The
--edition 2024flag stays as-is (it's the latest stabilized Rust language edition; there is no 2025 edition). What this pin closes is the binary-version drift, separate from the edition flag.Verified
rustup run 1.95.0 rustfmt --edition 2024 --check taurpc/src/export.rs-> zero diff on current mainpnpm lintclean (types + format + js)Caveat for #22 specifically
This makes the toolchain deterministic going forward. It does not retroactively reformat files. After rebasing #22 on this main:
taurpc/src/export.rscontent Oscar wrote uses a layout produced by a different rustfmt version and will still faildprint checkuntil he runspnpm format(orcargo fmt) locally with the pinned 1.95.0 toolchain and pushes the resulting diff