-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port into the std::future ecosystem. #73
Conversation
This looks like a terrifying amount of changes, but it's almost entirely mechanical rewritting from futures-0.1 to std::future APIs. The major semantic change is using #[tokio::main] for all of the examples and tests, instead of the (no longer cleanly exposed) block_on_all. While we could have continued to use block_on_all by linking directly against tokio-executor, .await syntax is likely more representative of how future APIs will be consumed going forward.
Oh, I forgot to mention it above but this is certainly a breaking change since the |
Looks like all the compilers in Appveyor are too old, and this change definitely violates the (implicit?) MSRV policy since it requires 1.39. |
Thanks for the PR! I definitely want to make this change but obviously not until the ecosystem is ready. I need to catch up a bit with |
No rush, I hacked this together over a weekend to shave some personal yaks. Just to capture some of the thoughts I had during the process before they entirely leak out of my head, a few of the hand-implemented features behave a little bit oddly in the context of |
This is currently blocked on egg-mode-rs/egg-mode#73
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.
Thanks so much for doing this, and sorry it has taken me so long to take a look at it. The good news is that the ecosystem has settled down somewhat now so I think we can get this release out quite soon.
Sorry that this is a bit of a patch bomb, but it's mostly a straightfoward find-and-replace job to convert from futures-0.1 to std::future. I'm not sure it should get merged until the upstream libraries (hyper, futures, etc.) make real point releases rather than alphas, but given the size of the patch I figured getting it out here sooner rather than latter was probably a good idea =). As mentioned in the commit message, I'm also converting all the examples (both binaries and docs) from
block_on_all
to.await
.