Closed wathiede closed 9 months ago
Hi, thank you for the contribution.
This makes sense, but I'm confused by the fact that we don't see failures in CI and using the library on our side. Could you share the feature combination that you're using and Rust version?
What operating system are you on?
I think I see the problem, and it's probably not worth accepting this pull request.
A minimal fresh project trying to use foundations
on my machine works, but when I first tried to use foundations
by adding it to an existing program I got the error listed above. By comparing cargo tree
output from the working and non-working crates, I realized the Cargo.lock
for the broken crate had hyper=0.14.16
which included socket2=0.4.3
. If I cargo update
that crate things build.
I might still push for this PR, or another that was more specific about the hyper versions (later versions include socket=0.5.5
like foundations do), but I see https://crates.io/crates/socket2/0.4.3 was yanked. So this is really an esoteric issue caused by my stale lockfile.
Sorry for the noise.
If we are relying on features in direct dependencies that we are failing to specify, then that is a bug.
If you reopen the PR, either I or @inikulin will merge.
Merged #6.
I'm seeing
It would appear this method isn't available unless
socket2
is compiled with theall
feature, see https://github.com/rust-lang/socket2/blob/master/src/sys/unix.rs#L2134-L2151