GithubHelp home page GithubHelp logo

Comments (4)

djc avatar djc commented on July 30, 2024 1

@zoni thanks for the ping! Doing a release for this probably makes sense. @LucioFranco can you take care of that? Maybe now is a good time to document the release process enough that others can also do it?

from tonic.

str4d avatar str4d commented on July 30, 2024

I encountered this issue as well. AFAICT the problem is this change in the hyper 1.0 upgrade PR:

- tokio-stream = "0.1"
+ h2 = {version = "0.4", optional = true}
+ hyper = {version = "1", features = ["full"], optional = true}
+ hyper-util = { version = ">=0.1.4, <0.2", features = ["full"], optional = true }
+ hyper-timeout = {version = "0.5", optional = true}
+ socket2 = { version = ">=0.4.7, <0.6.0", optional = true, features = ["all"] }
+ tokio = {version = "1", default-features = false, optional = true}
+ tokio-stream = { version = "0.1", features = ["net"] }

tokio-stream has always been a required dependency, and tokio is a required dependency of tokio-stream. But the only feature flag that was enabled was tokio/sync which works fine on WASM. However, tokio-stream/net enables tokio/net, and tonic 0.12 now requires tokio-stream/net.

It would be good to know whether tokio-stream/net is actually required at all times, or if it is only needed for the transport feature flag. I note that tokio-stream itself is listed under the section of dependencies for the transport feature flag, so maybe it has always only been used by that feature and just wasn't made optional? If it turns out that tokio/net is now required for tonic without feature flags, then that is an undocumented breaking change.

from tonic.

zoni avatar zoni commented on July 30, 2024

It appears this was already fixed with #1795.

On a wasm32-unknown-unknown project (which should behave the same as wasm32-wasi for the purposes of this issue) that has tonic = {version = "0.12", default-features = false, features = ["codegen", "prost"]} we had a similar problem trying to upgrade from 0.11 to 0.12.

Patching our dependencies to install from git with the above change included, using (in Cargo.toml):

[patch.crates-io]
tonic = { git = "https://github.com/hyperium/tonic.git", rev = "v0.12.0-12-gaa57ffe" }

...removes the offending tokio/mio dependencies and successfully compiles again.

(Ping @tottoto / @djc as an FYI in case this warrants more explicit calling out in future release notes and/or is worthy of an expedited 0.12.1 patch release)

from tonic.

LucioFranco avatar LucioFranco commented on July 30, 2024

v0.12.1 has been released.

from tonic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.