Declare Rust MSRV and warn against distro-packaged toolchains - #72
Open
AnonRish wants to merge 1 commit into
Open
Declare Rust MSRV and warn against distro-packaged toolchains#72AnonRish wants to merge 1 commit into
AnonRish wants to merge 1 commit into
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
rust-version = "1.85"under[workspace.package], matchingthe edition 2024 requirement already declared there
to the existing protoc-version rationale
than edition 2024 requires
Problem
The workspace sets
edition = "2024"(requires rustc >=1.85) but noCargo.toml declares
rust-version, and no doc states a minimum. Installingvia a Linux distribution's package manager -- a natural reading of "install
a Rust toolchain," and what many CI base images ship by default -- commonly
gives a too-old toolchain. On Ubuntu 24.04 (rustc 1.75.0) this fails with:
which reads like an unstable/nightly-feature problem rather than a version
mismatch.
Fix
rust-version = "1.85", standard MSRV metadata that crates.io andMSRV-aware tooling read.
explains why an old version fails the same way.
Verification
apt install rustc cargo.rust-versionand no docmentioned a minimum version, via grep across
**/*.mdand**/Cargo.toml.A toolchain old enough to reject
edition2024outright (1.75.0, testedabove) fails at manifest-parse time, before
rust-versionis checked, sothis doesn't change that specific error message -- it's correct, standard
metadata regardless, and should produce a clean version error on
toolchains between "supports rust-version" and "supports edition2024." The
doc change is the part verified to fix the reported symptom directly.