-
Notifications
You must be signed in to change notification settings - Fork 24
Tokio 0.2 #43
Conversation
e66f87a
to
7826e35
Compare
Did you try using If they don't work, then this code looks fine and works in my small project. Main thing I'm not sure about is depending on git repos, I'll leave making a call on that up to other maintainers that are more invested in this crate. |
In general, I prefer not to rely on Git repositories in released crates. (I don't mind the idea, in development, especially if part of testing practices for an ecosystem of crates.) However, I think it makes sense to have a branch of |
@Nemo157 suprisingly, @secretfader Hyper is the prime example of how to proceed. Right in the master branch it switched to git version tokio and then switched back to 0.2 alphas as they got released. |
If we're able to update the entire I'm not sure how rapidly new Tokio releases will land, but I believe it could be useful to keep these updates in a separate branch until we're reasonably sure that we can keep up with the release cadence of dependencies. An out-of-date or broken |
Yes, we should be able to keep up especially since http-service is only really used by Tide. See the companion PR at http-rs/tide#307 |
Is this ready to merge? The build is passing. |
LGTM. I'd like to see this merged too. @Nemo157 @yoshuawuyts, thoughts? |
Just as a side note: tokio 0.2.0-alpha.5 has been released on Sep 19th, not sure if it contains any breaking changes. |
Please note that this PR is not compatible with the latest hyper alpha due to the new Accept trait. I could use some help with it. |
d564fab
to
b389e71
Compare
I wish that I had more time to contribute. I expect others are in a similar bind. In my opinion, it's fine to let this PR sit until we can update to the latest dependencies and APIs (which I hope will also have less frequent churn by then). |
@secretfader Speaking of features at hand, the said Accept trait is not going away any time soon. This is tech debt that needs to be closed in any case. |
regarding the |
ab350a2
to
69339ab
Compare
I have made the minimum glue but had to sacrifice the customization incl. choosing non-Tokio runtime. |
.await?; | ||
|
||
let (parts, body) = rsp.into_parts(); | ||
let body: hyper::Body = body.into_vec().await?.into(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the body be wrapped into a compatible stream for hyper::Body
instead of converting it into a Vec
? I see for that we need the unstable-stream
feature from hyper.
dbf2df3 retains support for alternative runtimes (though I haven't tested it other than checking the example compiles). |
No description provided.