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

Update to edition 2018 #166

Merged
merged 3 commits into from
Aug 16, 2024
Merged

Update to edition 2018 #166

merged 3 commits into from
Aug 16, 2024

Conversation

kornelski
Copy link
Contributor

@kornelski kornelski commented Aug 16, 2024

This crate is one of the last ones on the edition 2015.

@sdroege
Copy link
Collaborator

sdroege commented Aug 16, 2024

Thanks!

@sdroege
Copy link
Collaborator

sdroege commented Aug 16, 2024

Looks like this needs a MSRV-specific Cargo.lock that has to be maintained manually for the foreseeable future 😢

@kornelski kornelski force-pushed the ed2018 branch 3 times, most recently from a723562 to 372635e Compare August 16, 2024 11:57
@@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
rust:
- 1.30.0
- 1.36.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

There is no lock file. Can you add a Cargo.lock.msrv or so that has versions of everything that would compile with 1.31, switch this here back to 1.31 and for the 1.31 build copy that lock file in place so it's used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm unable to generate a lockfile in a format old enough — the oldest Rust that exists for my platform is 1.46.

BTW, 73% of all crates are incompatible with <1.36, 97% of recently updated crates require 1.56+, and 99.5% crates.io requests are from Rust 1.65 or later.

https://lib.rs/stats#rustc-usage

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok, I'll take a look. Don't worry about that :)

I'm aware of those numbers and it's also ridiculous to me that some people can update random crates but not their toolchain, but here we are

Copy link
Contributor Author

@kornelski kornelski Aug 16, 2024

Choose a reason for hiding this comment

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

I don't think there's a single person able to use Rust 1.30 today. This is way below even Debian oldstable.

Even if such user exists, they already must have frozen all their dependencies and won't be able update any of them, so they won't update pkg-config either. There's only 6% of crates that work with 1.30 in their latest version, and majority of them are complete junk (reserved names, hello ferris, winapi crates that don't compile with Rust 1.x).

Rust 1.36 is still barely usable at all, and is not supported by any recent crates. Much later 1.56 is the baseline in practice, and even that is painful and requires careful management of lockfiles to downgrade most deps.

Rust 1.80 broke most versions of the time crate, so now Rust is incompatible with most non-trivial projects having Cargo.lock compatible with Rust <1.67, and I expect that to push MSRV of most crates even higher.

syn is 1.61, bitflags is 1.56, tokio is 1.70, unicode-width 1.62, base64 is 1.48, serde_json 1.56.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree with all you said. If it was for me, I would always just support latest stable. But I don't have the energy anymore to argue with people that have stupid requirements and somehow need a much older version, so if it's easy enough (like here) I rather do that.

@sdroege sdroege merged commit dc3b7b6 into rust-lang:master Aug 16, 2024
4 checks passed
@kornelski kornelski deleted the ed2018 branch August 21, 2024 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants