Skip to content
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

MSRV (1.56) and edition (2021) bump #2901

Merged
merged 4 commits into from
Mar 9, 2025
Merged

MSRV (1.56) and edition (2021) bump #2901

merged 4 commits into from
Mar 9, 2025

Conversation

oli-obk
Copy link
Member

@oli-obk oli-obk commented Mar 5, 2025

It has been 3 years (the 1.56 release) since rust-version was actually checked in Cargo.toml. So let's upgrade:

  • using rust-version set to 1.56 and dropping all the build.rs tricks we have to support Rust versions older than 3 years,
  • switching to the 2021 edition released at the same version

Then we can subsequently, once enough time has passed, release more serde versions that bump rust-version. I do not believe we'd inconvenience anyone, as either they are not updating their dependencies anyway (and almost everyone is bumping MSRV knowingly or unknowingly). While there are LTS systems (like debian and such) that use 5 years (or even more in some cases), these realistically can't update their dependencies without manual cherry picking anyway.

The reason I'm bringing this up now is we're optimistic that const-trait support will land this year. While I don't plan on moving serde to be usable in const contexts in any short timeframe, I want to slowly move us up so that we can make it usable in const contexts in the next 3 years.

oli-obk added 4 commits March 5, 2025 09:23
This is the first cargo version that actually enforces the rust-version field in Cargo.toml
@Mingun
Copy link
Contributor

Mingun commented Mar 5, 2025

Does it means that you may merge PRs of which impact you are not sure, like #2811?

@oli-obk
Copy link
Member Author

oli-obk commented Mar 5, 2025

No, this is not a breaking change nor a major version bump. This is a minor version bump, which is not allowed to break things, but only to signal that there is more change happening than in a usual patch release.

Edit: not a minor bump anymore

@Mingun
Copy link
Contributor

Mingun commented Mar 5, 2025

#2811 just doesn't break anything (all execution paths are covered by tests), so I ask.

@oli-obk oli-obk force-pushed the msrv-and-edition-bump branch from b6bd601 to c53bd64 Compare March 7, 2025 09:37
@@ -18,38 +18,17 @@ fn main() {
println!("cargo:rustc-check-cfg=cfg(no_core_error)");
println!("cargo:rustc-check-cfg=cfg(no_core_net)");
println!("cargo:rustc-check-cfg=cfg(no_core_num_saturating)");
println!("cargo:rustc-check-cfg=cfg(no_core_try_from)");
println!("cargo:rustc-check-cfg=cfg(no_diagnostic_namespace)");
println!("cargo:rustc-check-cfg=cfg(no_float_copysign)");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
println!("cargo:rustc-check-cfg=cfg(no_float_copysign)");

@dtolnay dtolnay force-pushed the msrv-and-edition-bump branch 2 times, most recently from d0c0c38 to 8b0e95b Compare March 9, 2025 19:32
Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dtolnay dtolnay merged commit da0b473 into master Mar 9, 2025
42 checks passed
@dtolnay dtolnay deleted the msrv-and-edition-bump branch March 9, 2025 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants