Reqwest: Re-enable trust-dns feature

Created on 7 Sep 2019  路  7Comments  路  Source: seanmonstar/reqwest

The trust-dns feature was disabled in #617 as the dependency was not yet updated to std::future. We should re-enable once it is available.

Most helpful comment

@seanmonstar, we can remove all depdencies on Fail and failure. We'll lose backtrace, but that is coming in std.

might need a 0.19 release of trust-dns...

All 7 comments

This was fixed here: https://github.com/bluejekyll/trust-dns/pull/849.

EDIT: So basically from version 0.18.0-alpha.1.

We can re-enable once the version is out of alpha!

Some notes as I tried to re-enable this:

  • ResolveError implements Fail instead of std::error::Error. I can get around this since it also implements Into<io::Error>, but it'd be better to not include failure in the dependency tree.
  • AsyncResolver requires passing a tokio::runtime::Handle to its constructors, but we don't have one and have no way of materializing one.
  • ResolveError implements Fail instead of std::error::Error. I can get around this since it also implements Into<io::Error>, but it'd be better to not include failure in the dependency tree.

It still implements Display, wihch is what we are using as far as I can see:
https://github.com/seanmonstar/reqwest/blob/35c6ddd00b20243106e11ca9aa46abbc33d56bc9/src/dns.rs#L73
In any case, trust-dns pulls in failure anyway, so no loss there.

  • AsyncResolver requires passing a tokio::runtime::Handle to its constructors, but we don't have one and have no way of materializing one.

See https://github.com/bluejekyll/trust-dns/issues/977 and https://github.com/tokio-rs/tokio/pull/2040.

I would like to take a stab at this when the Handle is resolved, if thats alright.

@seanmonstar, we can remove all depdencies on Fail and failure. We'll lose backtrace, but that is coming in std.

might need a 0.19 release of trust-dns...

FYI: https://github.com/bluejekyll/trust-dns/pull/988

This drops failure, uses thiserror for some std error generation. Is there anything else? I鈥檓 planning to do a 0.19 release this weekend to get this out.

Ok, 0.19 is released.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nuxeh picture nuxeh  路  4Comments

richardanaya picture richardanaya  路  5Comments

edouardmenayde picture edouardmenayde  路  4Comments

hwchen picture hwchen  路  4Comments

jeprojects picture jeprojects  路  3Comments