-
Notifications
You must be signed in to change notification settings - Fork 676
Description
Current Behavior
crates.io/app/models/version.js
Lines 53 to 65 in a27a914
| get msrv() { | |
| let rustVersion = this.rust_version; | |
| if (rustVersion) { | |
| // add `.0` suffix if the `rust-version` field only has two version components | |
| return /^[^.]+\.[^.]+$/.test(rustVersion) ? `${rustVersion}.0` : rustVersion; | |
| } else if (this.edition === '2018') { | |
| return '1.31.0'; | |
| } else if (this.edition === '2021') { | |
| return '1.56.0'; | |
| } else if (this.edition === '2024') { | |
| return '1.85.0'; | |
| } | |
| } |
... added by 93f8da5 causes crates.io to show an MSRV of 1.56.0 on all crates that have Edition 2021 and no explicit MSRV. This led to a user filing a bug on one of my crates that it doesn't compile with the old Rust version they wanted to use. I do not support such an old version of Rust for this crate, and it is misleading of crates.io to show 1.56.0 as the "Minimum Supported Rust Version". Only the crate author gets to decide what versions of Rust are and are not supported, and an arbitrary lower bound inferred from the edition does not mean that version is supported.
Expected Behavior
crates.io should only display the value explicitly specified via the rust-version manifest field, and if it isn't present it should display as "Unknown" or something, not a made-up value.
Steps To Reproduce
https://crates.io/crates/k8s-openapi/versions
Environment
N/A
Anything else?
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
