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

deps!: bump socket2 (to 0.5.3) and MSRV (to 1.63) #5877

Closed
wants to merge 3 commits into from
Closed

deps!: bump socket2 (to 0.5.3) and MSRV (to 1.63) #5877

wants to merge 3 commits into from

Conversation

BastiDood
Copy link

Motivation

Due to MSRV restrictions, the tokio crate depends on an old version of the socket2 crate that depends on the winapi crate. This is unfortunate because nowadays, we should prefer the officially maintained windows-sys crate for Windows API bindings.

Note that this problem is not only an issue of updating dependencies to the latest version. By keeping the old version of socket2 around, we are forcing consumers of the tokio crate to download and compile two redundant crates in the dependency tree: winapi and windows-sys. With the latter being officially supported, it is about time we prune winapi from the dependency tree.

Solution

This PR bumps socket2 to version 0.5, which is the final piece in the dependency tree that still previously relied on winapi. See the changelog for more details. All references in the documentation and manifest files have been updated accordingly.

Note that this has already been attempted in #5603. However, due to MSRV constraints, the author promptly closed the PR. A few months later, it should now be safe to bump the MSRV to 1.63, which also happens to be the MSRV for socket2. Since 1.63 was released eleven months ago as of writing, we are well beyond the six-month eligibility requirement of the MSRV policy. 🎉

@carllerche
Copy link
Member

Thanks for the PR. Before we do something like this, it probably would be worth evaluating if socket2 is worth keeping around. How much are we using it and how hard would it be to implement that functionality ourselves in tokio.

@Darksonn Darksonn added A-tokio Area: The main tokio crate M-net Module: tokio/net labels Jul 17, 2023
@BastiDood
Copy link
Author

... it probably would be worth evaluating if socket2 is worth keeping around. How much are we using it and how hard would it be to implement that functionality ourselves in tokio.

Fair enough. I have not considered this. In all honesty, my original intention was just to bump the dependency so that we could finally prune winapi off of the tree. 😅

But if this PR leads to an exploration that may prune socket2 altogether, then I'm all for that as well! It never hurts to have fewer dependencies. 😃

@KronicDeth
Copy link

KronicDeth commented Jul 24, 2023

We'd like the update to socket2 for the watchOS and tvOS support added in socket2 0.5.0 to get support for those architectures in liveview-native/phoenix-channels-client#37. Would the socket2 alternatives support watchOS and tvOS?

@Darksonn
Copy link
Contributor

Closing as duplicate of #5887.

@KronicDeth We are going to be upgrading socket2, so if the new version supports those, then it should work.

@Darksonn Darksonn closed this Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-net Module: tokio/net
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants