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

Move to Rust edition 2021 and version 1.56 #2568

Merged
merged 5 commits into from Jul 6, 2023
Merged

Move to Rust edition 2021 and version 1.56 #2568

merged 5 commits into from Jul 6, 2023

Conversation

kennykerr
Copy link
Collaborator

Now that the major crate dependencies like syn and tokio have moved to 1.56 or later, windows-rs can finally make the move to the 2021 edition of Rust and MSRV for windows and windows-sys will be 1.56 from here on.

@kennykerr
Copy link
Collaborator Author

Looks like this is failing due to a change in 2021: https://doc.rust-lang.org/stable/edition-guide/rust-2021/reserving-syntax.html

@kennykerr kennykerr merged commit a8ee48a into master Jul 6, 2023
47 checks passed
@kennykerr kennykerr deleted the msrv branch July 6, 2023 20:55
@TheBlueMatt
Copy link

tokio still supports 1.49 still on their LTS release of 1.25, which was broken by this.

@Thomasdezeeuw
Copy link

Thomasdezeeuw commented Aug 17, 2023

@TheBlueMatt I don't think that's true, Mio only depends on v0.48, see https://github.com/tokio-rs/mio/blob/8dd37c5e14bf7031365321c5aad5dc85788b9a09/Cargo.toml#L52, Cargo isn't allowed to use v0.49 or v0.50 because of that.

@TheBlueMatt
Copy link

TheBlueMatt commented Aug 17, 2023

Not sure what you mean by 0.49 or 0.50 (I don't see a windows-sys or windows-targets version for either of those, but windows-sys 0.48 depends on windows-targets 0.48... which got switched to windows-targets 0.48.3, which is what ultimately broke here.

@TheBlueMatt
Copy link

See specifically the dependency tree posted at tokio-rs/tokio#5934 (comment) which shows mio depending on 0.48 and windows-targets v0.48.3 (which broke the previous M"S"RV of windows-targets).

@TheBlueMatt
Copy link

The following script run in an empty directory illustrates the change in M"S"RV in the windows-targets crate(s) reached via mio in tokio 1.25.1, which is still supported and has a non-windows MSRV of 1.49:

#/bin/sh
rustup default 1.49
cargo init .
echo 'tokio = { version = "=1.25.1", features = ["net"] }' >> Cargo.toml
cargo tree --target x86_64-pc-windows-msvc # This fails
cargo update -p windows-targets:0.48.3 --precise "0.48.1" --verbose
cargo update -p windows_aarch64_gnullvm:0.48.3 --precise "0.48.0" --verbose
cargo update -p windows_x86_64_gnullvm:0.48.3 --precise "0.48.0" --verbose
cargo update -p windows_x86_64_gnu:0.48.3 --precise "0.48.0" --verbose
cargo update -p windows_i686_gnu:0.48.3 --precise "0.48.0" --verbose
cargo update -p windows_aarch64_msvc:0.48.3 --precise "0.48.0" --verbose
cargo update -p windows_x86_64_msvc:0.48.3 --precise "0.48.0" --verbose
cargo update -p windows_i686_msvc:0.48.3 --precise "0.48.0" --verbose
cargo tree --target x86_64-pc-windows-msvc # This now passes

@kennykerr
Copy link
Collaborator Author

Hopefully #2613 will help.

@TheBlueMatt
Copy link

TheBlueMatt commented Aug 17, 2023

Thanks! That would certainly address the issue I'm hitting. However, more generally, I took your comment at tokio-rs/tokio#5934 (comment) to imply that there is no MSRV (ie version supported, not just the field in the Cargo.toml) which would imply that this issue could happen in the future and its not explicitly supported? Is that true or did I miunderstand your comment (is the MSRV here fixed for a given minor version?). Of course there's no pressure on any project to support anything they don't want to, I just want to know what is supported for our own reference and build systems.

@kennykerr
Copy link
Collaborator Author

That comment was purely about the fact that Rust 1.48 doesn't support the version key.

@TheBlueMatt
Copy link

Ah, I definitely very much misunderstood that comment. Could you comment on the MSRV (policy, not keys) of the windows-rs crate family?

@kennykerr
Copy link
Collaborator Author

kennykerr commented Aug 17, 2023

The 0.48 crates have an MSRV of 1.48 while the newer crates have an MSRV of 1.56.

So this was not intentional. it's just that testing 1.48 is virtually impossible.

@TheBlueMatt
Copy link

Ah! Okay, thanks. Much appreciated.

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.

None yet

3 participants