-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Tracking issue for RFC 2495, "Minimum Supported Rust Version" #65262
Comments
My personal opinions: Name →
|
My personal preference would be Regarding nightly versions: I do not like the suggestion by @jhpratt to use semver version for nightly (e.g. |
Agreed with @Majkl578 about the |
I went through the discussions and I couldn't see anyone discussing representing the version as a semver version requirement like package dependencies, only instead defaulting to a |
Minimum rust version should absolutely be a semver comparison, yes. |
I read the RFC a second time and saw a part suggesting semver comparison but I'm leaving my comment to keep the use-case clearly vocalized |
What is this use-case though? In your previous post you only said it would be useful for you personally, without specifying why exactly. In the RFC I've wrote:
exactly because I didn't see why it would be useful outside of the nightly extension, and even with the extension I am not 100% sure this feature would pull its weight. Also IIRC during discussion no one have brought any substantial arguments for supporting range operators with "1.X" versions. |
Targeting a specific Rust ABI would require pinning the Rustc version to an exact number. This can easily be accomplished with semver without developing an entirely new syntax |
How can a minimum be a range though? How is a minimum of |
I suggested semver defaulting to a |
@distransient By definition semver-compliant constraint can't default to |
Rust attempts to, but there are clearly spelled out parts where it is not followed perfectly. |
(this is not correct; ranges are not defined in the spec at all. rust
follows the entire semver spec accurately, but there are some extensions to
the spec (like ranges) that different implementations disagree on. (I
maintain both semver the spec as well as semver the rust package.))
…On Fri, Dec 13, 2019 at 1:45 PM Lokathor ***@***.***> wrote:
Rust attempts to, but there are clearly spelled out parts where it is not
followed perfectly.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#65262?email_source=notifications&email_token=AAAGZCQDKNE5AWRQO2DV7HTQYPQ7JA5CNFSM4I7IF7Q2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG3BYIQ#issuecomment-565582882>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAGZCRF4P2XHICGQJUFXOTQYPQ7JANCNFSM4I7IF7QQ>
.
|
That is correct, but I wasn't talking about ranges, I was referring to Rust's policy of accepted breakage. |
Given that we're extremely unlikely to ever have a rust 2.x.y semver, I would propose that we use |
Cargo uses |
@Lokathor the semver spec also says that projects define what “breakage” is. That said, yes, ^ is a good default. |
Yep, sorry again about the delay. The team did talk about it in our last meeting and we felt like |
Cool, thanks, I'll see if I can shake loose some testing efforts. |
Wrote up a call for testing here: https://users.rust-lang.org/t/call-for-testing-unstable-cargo-support-for-rust-version/59386 If anyone here has other suggestions for what kinds of things to test, please suggest them there. |
rust-lang/rust#65262 describes the `rust-version` Cargo attribute to document a crate's MSRV (Minimum Supported Rust Version), but it's only available on nightly. It was causing a nasty warning on stable, so let's remove it.
This is on track to be stabilized in 1.56. |
@joshtriplett |
@newpavlov That was moved to future work because, among other things, it would need some confirmation that the proposed approach to resolution is something we'd want to do. Given such confirmation, someone would then need to submit a PR implementing it. |
Sorry, forgot that there was a second tracking issue. Closing as this has been stabilized in rust-lang/cargo#9732. |
I went ahead and created a separate issue for MSRV-dependent dependency version resolution: #89136 |
<rust-lang/rust#65262>, will release in 1.56 This won't yet address the version resolution issues in cargo but it's close. Damn, just narrowly missed the window for Debian bullseye—maybe it will be available in bookworm?
This will be stabilized with Rust 1.56, see * rust-lang/rust#65262 * rust-lang/cargo#9732 For older cargo versions, this will print a warning, but will not fail the build/check/test.
374: Specify MSRV in Cargo.toml r=jonasbb a=jonasbb This will be stabilized with Rust 1.56, see * rust-lang/rust#65262 * rust-lang/cargo#9732 For older cargo versions, this will print a warning, but will not fail the build/check/test. Co-authored-by: Jonas Bushart <jonas@bushart.org>
To save people's time: As per https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-rust-version-field, the field is called |
This is a tracking issue for the RFC "Minimum Supported Rust Version" (rust-lang/rfcs#2495).
Note: There is a separate tracking issue on the Cargo side at: rust-lang/cargo#8072
Documentation: https://doc.rust-lang.org/cargo/reference/manifest.html#the-rust-version-field
Steps:
instructions?)
Unresolved questions:
rust
vsrustc
vsmin-rust-version
The text was updated successfully, but these errors were encountered: