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

Bump tonic and prost dependencies #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

erebe
Copy link

@erebe erebe commented Jan 27, 2022

  • When using a newer version of prost (in my case 0.9) the crate complains that it can find the prost::Message trait.
    Bumping the version of tonic and prost fix the issue

- When using a newer version of prost (in my case 0.9) the crate complains that it can find the prost::Message trait.
  Bumping the version of tonic and prost fix the issue
@erebe
Copy link
Author

erebe commented Feb 7, 2022

gentle bump :)

@teohhanhui
Copy link

And now tonic is at 0.8.0 🙈

@erebe
Copy link
Author

erebe commented Sep 8, 2022

I still use the project and bumped the version for the 0.8.0 to work, but haven't bothered to update the PR as the author seem absent.

Regarding mocking, I saw that tonic propose some way to mock directly in their project
https://github.com/hyperium/tonic/blob/master/examples/src/mock/mock.rs

but I haven't tested myself, as I already have done my tests with this project.
Maybe worth considering instead of relying on this dead project

@teohhanhui
Copy link

teohhanhui commented Sep 8, 2022

Yes, indeed, I follow the same example and realized I have no need for this project.

Additionally, for streaming requests / streaming responses do something like:

let (req_tx, req_rx) = mpsc::channel(128);
let req_stream = ReceiverStream::new(req_rx);
let mut res_stream = client.some_streaming_method(Request::new(req_stream)).await?;

let req = SomeRequest { ... };
req_tx.send(req).await?;
let res = res_stream.message().await;
assert!(res.is_ok());
let res = res.unwrap();
assert!(res.is_some());

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.

2 participants