Skip to content
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

Upgrade to Tokio 1.0.0 ecosystem #530

Merged
merged 4 commits into from
Jan 11, 2021

Conversation

QuentinPerez
Copy link
Contributor

@QuentinPerez QuentinPerez commented Jan 8, 2021

Hey 👋 ,

A quick PR to finish the work done by @marshaled here #514.

Before merging, we have to wait for the release of warp, this PR depends on a fork.

marshaled and others added 2 commits January 8, 2021 15:37
Work in progress for updating Tonic to Tokio 1.0. Since tower has not
been released to crates.io, a git dependency is taken instead.
@QuentinPerez QuentinPerez force-pushed the qperez/upgrade-to-tokio-1 branch from 515445e to 329fe32 Compare January 8, 2021 16:28
@coolreader18
Copy link

It looks like tower-balance and some other crates have been merged into tower submodules gated by features (which you've enabled). The current tower documentation says:

Tower is made up of the following crates:

  • tower (this crate)
  • tower-service
  • tower-layer
  • tower-test

So I think it would be good to drop the other crates, which still depend on tokio 0.2 as well.

@QuentinPerez
Copy link
Contributor Author

Oh yes good catch, fixed thx

@simonsan
Copy link

simonsan commented Jan 9, 2021

@davidpdrsn
Copy link
Member

davidpdrsn commented Jan 11, 2021

I've tried updating my codebase to use this patch and ran into something a little annoying. It seems Channel is not longer Sync because it contains a Semaphore from tower. Channel being Sync is something I relied upon in my codebase. Not sure if I should find a solution that doesn't depend on Channel being Sync or if there is some way to rectifying it.

@coolreader18
Copy link

coolreader18 commented Jan 11, 2021

@davidpdrsn I'm not sure how that'd be useful for Channel to be Sync, since all the uses of it require &mut anyway. Maybe try putting it in a Mutex to make it Sync? Since I assume you just need to store it if it was working before with mutable access, you wouldn't ever need to lock it, and you can just use Mutex::get_mut() when you do have mut access.

Copy link
Member

@LucioFranco LucioFranco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Will get this merged so we can move forward.

hyper = "0.13"
warp = { version = "0.2", default-features = false }
hyper = "0.14"
warp = { git = "https://github.com/aknuds1/warp", branch = "chore/upgrade-tokio", default-features = false }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just for examples, so not blocking a release!

@davidpdrsn
Copy link
Member

@coolreader18 its being fixed in tower as we speak 😊

@LucioFranco LucioFranco merged commit fdda5ae into hyperium:master Jan 11, 2021
@QuentinPerez QuentinPerez deleted the qperez/upgrade-to-tokio-1 branch January 11, 2021 22:42
@djc djc mentioned this pull request Jan 12, 2021
@edrevo
Copy link
Contributor

edrevo commented Jan 14, 2021

Are there any other changes needed for a new release of tonic? Can't wait to get all the good bits that have been added since 0.3.1!

@LucioFranco
Copy link
Member

@edrevo going through that all right now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants