Hyper: Support socket2 0.3.13

Created on 14 Aug 2020  路  4Comments  路  Source: hyperium/hyper

socket2 0.3.13 was just pushed, these changes break hyper in a few places

Errors from my project:

Compiling hyper v0.13.7
error[E0599]: no function or associated item named ipv4 found for struct socket2::Domain in the current scope
   --> C:\...\hyper-0.13.7\src\client\connect\http.rs:556:38
    |
556 |         SocketAddr::V4(_) => Domain::ipv4(),
    |                                      ^^^^ function or associated item not found in socket2::Domain

error[E0599]: no function or associated item named ipv6 found for struct socket2::Domain in the current scope
   --> C:\...\hyper-0.13.7\src\client\connect\http.rs:557:38
    |
557 |         SocketAddr::V6(_) => Domain::ipv6(),
    |                                      ^^^^ function or associated item not found in socket2::Domain

error[E0599]: no function or associated item named stream found for struct socket2::Type in the current scope
   --> C:\...\hyper-0.13.7\src\client\connect\http.rs:559:44
    |
559 |     let socket = Socket::new(domain, Type::stream(), Some(Protocol::tcp()))?;
    |                                            ^^^^^^ function or associated item not found in socket2::Type

error[E0599]: no function or associated item named tcp found for struct socket2::Protocol in the current scope
   --> C:\...\hyper-0.13.7\src\client\connect\http.rs:559:69
    |
559 |     let socket = Socket::new(domain, Type::stream(), Some(Protocol::tcp()))?;
    |                                                                     ^^^ function or associated item not found in socket2::Protocol

error: aborting due to 4 previous errors
B-upstream

Most helpful comment

The broken versions have been yanked, anyone who has updated to a broken version can run cargo update -p socket2 --precise 0.3.12.

All 4 comments

Adding socket2 = "=0.3.12" to Cargo.toml fixes my build (temporary workaround)

Sounds like socket2 published a breaking change in a patch version?

The broken versions have been yanked, anyone who has updated to a broken version can run cargo update -p socket2 --precise 0.3.12.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hwchen picture hwchen  路  3Comments

da2018 picture da2018  路  3Comments

mcseemk picture mcseemk  路  3Comments

FGRibreau picture FGRibreau  路  4Comments

crackcomm picture crackcomm  路  5Comments