-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Build warnings in proto defs #295
Comments
Hi @hntd187! Thanks for opening a bug report. This reproduces easily using the latest release of tonic/tonic-build/src/server.rs Line 257 in f65cda1
There seem to be two approaches to resolving this:
@LucioFranco Any thoughts on which approach you'd prefer here? |
@jen20 the |
Also to note, this change will go out with 0.2 which is slightly on hold for the moment, so when this gets fixed on master I'd suggest users to work off of master for a bit. |
This commit adjusts the code generation for the internal structs in the implementation of Service<http::Request<HyperBody>> for *Server<T> in order to annotate internal structs whose names are derived from gRPC method names with `[allow(non_camel_case_types)]`. This supresses compiler warnings about type names when compiling generated code. The struct names are not exposed externally, so this has no impact on types seen by library consumers. Fixes #295.
This commit adjusts the code generation for the internal structs in the implementation of Service<http::Request<HyperBody>> for *Server<T> in order to annotate internal structs whose names are derived from gRPC method names with `[allow(non_camel_case_types)]`. This supresses compiler warnings about type names when compiling generated code. The struct names are not exposed externally, so this has no impact on types seen by library consumers. Fixes #295.
This commit adjusts the code generation for the internal structs in the implementation of Service<http::Request<HyperBody>> for *Server<T> in order to annotate internal structs whose names are derived from gRPC method names with `[allow(non_camel_case_types)]`. This supresses compiler warnings about type names when compiling generated code. The struct names are not exposed externally, so this has no impact on types seen by library consumers. Fixes #295.
this also happens in streaming calls.
generated server code:
when compiling:
|
Bug Report
Version
0.1.1
Platform
All (happens on windows, osx and linux)
Description
I get build warnings like the following
My proto def can be found here.
https://github.com/toshi-search/Toshi/blob/master/toshi-proto/proto/cluster.proto
The text was updated successfully, but these errors were encountered: