Closed daboross closed 2 years ago
@magiclen any interest in having this fixed? Or at least publish the source-code for 1.4.0 so others could fork it to have a maintained library?
@daboross @Esc4iCEscEsc
Sorry, I have been busy recently. I will update this crate and validators
in the next 3 days.
validators
has been updated to 0.24 now. It can be compiled in Rust 2021 edition.
Awesome, thanks so much for the quick fix for this!
Hi,
This bug report stems from this users.rust-lang.org issue.
The Rust 2021 edition enables a new cargo feature resolver which resolves features separately for build dependencies - such as derive crates - and regular dependencies. It looks like this is a rare case of a project's edition affecting everything in its dependency tree, so projects depending on
whois-rust
using Rust 2021 edition will enable this different resolver for whois-rust as well.whois-rust
uses types only present invalidators
when the"host"
feature is enabled. However, it only declares a dependency onvalidators-derive/host
, notvalidators/host
.This was never an issue, as
validators-derive/host
depends onvalidators/host
, but with the new feature resolver, validators-derive and its dependencies compiled for the build process are treated completely separately from validators for the compiled library, so thevalidators
imported intowhois-rust
no longer has the host feature enabled.The end result is this, for any project depending on
whois-rust
using the 2021 edition:I suggest a simple fix of replacing
validators = "0.23"
in Cargo.toml with:I'd submit a PR, but I can't seem to find the sources for whois-rust 1.4.0, so I hope this will do.