Skip to content

components: don't infer MSRV based on edition #10108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

LawnGnome
Copy link
Contributor

I assume we'll want to bikeshed the tooltip wording here. I don't know if showing the minimum edition version is actually useful, honestly, but I included it for now for discussion purposes.

Visually, this feels like it works out OK:

Edition MSRV
image image
edition msrv

I toyed with using small caps for the "edition" label on the versions list, but it looked weird with the uppercase "features", so I dropped it.


In #9996, we started showing the MSRV based on the edition for crate versions that declare an edition but not a rust-version in their manifest. This isn't strictly correct: a crate may require features added later in an edition than in the first Rust version that defined that edition, and showing this as an MSRV implies a level of support that the crate author may not have intended.

So, we shouldn't show an MSRV if one isn't declared, but we can show the edition if one of those is defined. Let's do that.

Fixes #10103.

In rust-lang#9996, we started showing the MSRV based on the edition for crate
versions that declare an edition but not a `rust-version` in their
manifest. This isn't strictly correct: a crate may require features
added later in an edition than in the first Rust version that defined
that edition, and showing this as an MSRV implies a level of support
that the crate author may not have intended.

So, we shouldn't show an MSRV if one isn't declared, but we _can_ show
the edition if one of those is defined. Let's do that.

Fixes rust-lang#10103.
@LawnGnome LawnGnome requested a review from Turbo87 November 29, 2024 17:00
@LawnGnome LawnGnome self-assigned this Nov 29, 2024
@Arnavion
Copy link

Thanks. Showing the edition instead is a good idea and would also solve my issue.

@Turbo87 Turbo87 merged commit 74cddcc into rust-lang:main Dec 2, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inferred MSRV from Edition is misleading since the crate doesn't necessarily support the inferred version
3 participants