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 tonic 0.12 / hyper 1.0 #83

Closed
flokli opened this issue Jul 20, 2024 · 6 comments
Closed

upgrade to tonic 0.12 / hyper 1.0 #83

flokli opened this issue Jul 20, 2024 · 6 comments

Comments

@flokli
Copy link
Contributor

flokli commented Jul 20, 2024

Tracking issue, upgrading to tonic 0.12 / hyper 1.0 is still blocked on the prost-wkt crate family bump (fdeantoni/prost-wkt#68).

@flokli
Copy link
Contributor Author

flokli commented Jul 20, 2024

I locally updated my Cargo.toml to the same workaround as in github/twirp-rs#60.

error[E0191]: the value of the associated types `Error` and `Data` in `tonic::transport::Body` must be specified
  --> bigtable_rs/src/auth_service.rs:36:30
   |
36 |     type Response = Response<Body>;
   |                              ^^^^ help: specify the associated types: `Body<Data = Type, Error = Type>`

error[E0277]: the trait bound `tokio::net::UnixStream: hyper::rt::io::Read` is not satisfied
   --> bigtable_rs/src/bigtable.rs:370:50
    |
370 |             endpoint.connect_with_connector_lazy(connector)
    |                      --------------------------- ^^^^^^^^^ the trait `hyper::rt::io::Read` is not implemented for `tokio::net::UnixStream`
    |                      |
    |                      required by a bound introduced by this call
    |
    = help: the following other types implement trait `hyper::rt::io::Read`:
              hyper_rustls::stream::MaybeHttpsStream<T>
              hyper_timeout::stream::TimeoutReader<R>
              hyper_timeout::stream::TimeoutWriter<W>
              hyper_timeout::stream::TimeoutStream<S>
              Box<T>
              hyper::upgrade::Upgraded
              hyper_util::rt::tokio::TokioIo<T>
              Pin<P>
              &mut T
note: required by a bound in `Endpoint::connect_with_connector_lazy`
   --> /home/flokli/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tonic-0.12.1/src/transport/channel/endpoint.rs:376:22
    |
373 |     pub fn connect_with_connector_lazy<C>(&self, connector: C) -> Channel
    |            --------------------------- required by a bound in this associated function
...
376 |         C::Response: rt::Read + rt::Write + Send + Unpin + 'static,
    |                      ^^^^^^^^ required by this bound in `Endpoint::connect_with_connector_lazy`

error[E0277]: the trait bound `tokio::net::UnixStream: hyper::rt::io::Write` is not satisfied
   --> bigtable_rs/src/bigtable.rs:370:50
    |
370 |             endpoint.connect_with_connector_lazy(connector)
    |                      --------------------------- ^^^^^^^^^ the trait `hyper::rt::io::Write` is not implemented for `tokio::net::UnixStream`
    |                      |
    |                      required by a bound introduced by this call
    |
    = help: the following other types implement trait `hyper::rt::io::Write`:
              hyper_rustls::stream::MaybeHttpsStream<T>
              hyper_timeout::stream::TimeoutReader<R>
              hyper_timeout::stream::TimeoutWriter<W>
              hyper_timeout::stream::TimeoutStream<S>
              Box<T>
              hyper::upgrade::Upgraded
              hyper_util::rt::tokio::TokioIo<T>
              Pin<P>
              &mut T
note: required by a bound in `Endpoint::connect_with_connector_lazy`
   --> /home/flokli/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tonic-0.12.1/src/transport/channel/endpoint.rs:376:33
    |
373 |     pub fn connect_with_connector_lazy<C>(&self, connector: C) -> Channel
    |            --------------------------- required by a bound in this associated function
...
376 |         C::Response: rt::Read + rt::Write + Send + Unpin + 'static,
    |                                 ^^^^^^^^^ required by this bound in `Endpoint::connect_with_connector_lazy`

error[E0782]: trait objects must include the `dyn` keyword
  --> bigtable_rs/src/auth_service.rs:36:30
   |
36 |     type Response = Response<Body>;
   |                              ^^^^
   |
help: add `dyn` keyword before this trait
   |
36 |     type Response = Response<dyn Body>;
   |                              +++

Some errors have detailed explanations: E0191, E0277, E0782.
For more information about an error, try `rustc --explain E0191`.
error: could not compile `bigtable_rs` (lib) due to 4 previous errors

Looks like the API changed a slight bit, but should be doable.

@liufuyang
Copy link
Owner

Thanks, that sounds good, I will try to find some time recently to take a closer look :)

@flokli
Copy link
Contributor Author

flokli commented Jul 28, 2024

prost-wkt update got merged, so this should be unblocked.

@liufuyang you want me to push a WIP PR, and you continue from there?

@liufuyang
Copy link
Owner

liufuyang commented Jul 28, 2024 via email

@flokli
Copy link
Contributor Author

flokli commented Jul 30, 2024

PR is up at #86.

@flokli
Copy link
Contributor Author

flokli commented Sep 9, 2024

Done in #92.

@flokli flokli closed this as completed Sep 9, 2024
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

No branches or pull requests

2 participants