Reexport `hyper::server::Request`
abonander opened this issue · comments
Currently in multipart
it is necessary to include the hyper
crate when building the integration with Nickel because it is the hyper::server::Request
type that is the actual readable part of the request, but this type is not reexported in Nickel.
This causes problems when we want to upgrade the hyper
version in multipart
, which we've dealt with before by asking Nickel to upgrade simultaneously. (#367)
However, it would be simpler if Nickel just reexported the hyper::server::Request
type from the version of Hyper it uses so that it is no longer necessary to import that type in multipart
's integration with Nickel. That way, the versions of Hyper and Nickel that multipart
uses don't have to be coupled together.
Has there been an update to this?
Is this still desired?
It would allow me to bring Nickel support back into mainline multipart
, so yes.
Have you had a chance to look at hyper 0.11.x? The Request type changes a fair amount; you can see my work in progress at #410. Would this change still be helpful there?
I'm mostly asking for long term planning. I'll try to fold this into the 0.10.x versions in any case.
I'm actually creating a new multipart crate for async HTTP APIs instead of a version bump so the two can develop independently.
So this means you're probably going to be using both Request
and Body
in the public API, in which case I'd need both of those to be reexported. Or better yet, just have pub extern crate hyper
. That way the version of Hyper that I use doesn't have to be pinned to the version that Nickel uses.
Would the pub extern crate hyper
be a good solution for both the 0.10.x and 0.11.x development? Since I find I need to access hyper objects in regular use of Nickel, this seems like an all around win. Would this mean that applications that use nickel would no longer need an explicit dependency on hyper too?
Yeah, that'd be pretty much perfect. Yes, it wouldn't need a separate Hyper dependency with the correct version pinned.
I'll merge #418 tomorrow, and push 0.10.1 to crates.
I've pushed 0.10.1 with this change (and some others).
This can be closed now.