Skip to content
This repository has been archived by the owner on Jul 22, 2019. It is now read-only.

tokio-process can't coexist with tokio #27

Closed
Twey opened this issue Mar 8, 2018 · 15 comments
Closed

tokio-process can't coexist with tokio #27

Twey opened this issue Mar 8, 2018 · 15 comments

Comments

@Twey
Copy link

Twey commented Mar 8, 2018

tokio-core is now deprecated, and the new tokio crate has a completely different model for execution. Notably, there is AFAICT no way to get a tokio_core::reactor::Handle or anything similar from tokio, which makes many of tokio-process's functions uncallable.

@alexcrichton
Copy link
Owner

Thanks for the report! Once futures 0.2 is published I plan on updating.

@ipetkov
Copy link
Collaborator

ipetkov commented Mar 9, 2018

@alexcrichton on an unrelated note, is the plan to release 0.3 once futures 0.2 is out?

@alexcrichton
Copy link
Owner

@ipetkov oh isn't this lib currently at 0.1?, making the futures 0.2 compatible release 0.2?

@ipetkov
Copy link
Collaborator

ipetkov commented Mar 9, 2018

Unfortunately we've got a published, but yanked, 0.2 version. Releasing a new 0.2.x version will have breaking changes relative to 0.2.0 and will probably cause more problems for anyone that happens to be on 0.2.0.

I figured jumping directly to 0.3 will just bypass any of these headaches and start over!

@alexcrichton
Copy link
Owner

Oh I was gonna publish 0.2.1, while technically breaking I can't imagine anyone's actually relying on 0.2.0

@ipetkov
Copy link
Collaborator

ipetkov commented Mar 9, 2018

Fair enough, will trust your judgement here, thanks!

@tarcieri
Copy link

tarcieri commented Apr 8, 2018

What's the story here now that futures 0.2 is out?

@ipetkov
Copy link
Collaborator

ipetkov commented Apr 8, 2018

@tarcieri I've created a milestone for tracking changes for a 0.2.x release

cc @alexcrichton

@alexcrichton
Copy link
Owner

Thanks @ipetkov! I wonder, does Tokio support futures 0.2 yet?

@Twey
Copy link
Author

Twey commented Apr 18, 2018

Yes, with the unstable-futures feature.

@ipetkov
Copy link
Collaborator

ipetkov commented Apr 18, 2018

FWIW, according to tokio-rs/tokio#312 the "recommendation from the futures team is to not update libraries fully to 0.2", given that futures 0.3 is on the horizon.

@tarcieri
Copy link

What's the path forward here?

I think some of the comments in the OP are incorrect:

Notably, there is AFAICT no way to get a tokio_core::reactor::Handle or anything similar from tokio, which makes many of tokio-process's functions uncallable.

The tokio (as opposed to tokio-core) crate does emphasize using the run function as a simple API, but still supports an API similar to what tokio-core provided originally, however you can obtain a Runtime which has a reactor method that returns a Handle.

The problem is the tokio and tokio-core reactors are incompatible. From what I can tell separate of the discussion about upgrading futures, this crate just needs to be updated to be compatible with the tokio crate instead of tokio-core.

@Twey
Copy link
Author

Twey commented Apr 24, 2018

Yes, I believe that's true. I must have just missed that on my first time through — I guess the port is easier than I anticipated then.

@tarcieri
Copy link

tarcieri commented May 2, 2018

It looks like #29 (tokio-core => tokio) and #30 (futures 0.2 upgrade) cover both of these problems as separate issues. Perhaps it's worth closing this issue and moving discussion there?

@Twey
Copy link
Author

Twey commented May 3, 2018

Fine by me.

@Twey Twey closed this as completed May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants