You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ERROR] generated-sources/grpc/mypackage/MutinyMyServiceGrpc.java:[73,117] cannot find symbol
[ERROR] symbol: method getServiceinfoMethod()
[ERROR] location: class mypackage.MyServiceGrpc
and in ``MutinyMyServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.MutinyStubit isdelegateStub::service_info` instead of `delegateStub::serviceInfo`
public io.smallrye.mutiny.Uni<mypackage.ServiceInfo> service_info(mypackage.ServiceInfoRequest request) {
return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::service_info);
}
causes
[ERROR] generated-sources/grpc/mypackage/MutinyMyServiceGrpc.java:[44,72] invalid method reference
[ERROR] cannot find symbol
[ERROR] symbol: method service_info()
[ERROR] location: class mypackage.MyServiceGrpc.MyServiceStub
Expected behavior
Generated code is consistent and can be compiled
Actual behavior
No response
How to Reproduce?
Download Quarkus sample for grpc.
Add proto example file with name my-service.proto into /src/main/proto, see an example above.
Run mvn package
Output of uname -a or ver
No response
Output of java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of mvnw --version or gradlew --version)
No response
Additional information
No response
The text was updated successfully, but these errors were encountered:
So according to the style guide for proto buffers you should use CamelCase for service methods. Of course, if you don't control the proto file then it's a problem.
I'm not sure why but it seems that the grpc-java compiler attempts to "adjust the service name to follow the JavaBean spec". However, I don't think that the JavaBean spec defines some special rules for methods that are not used to extract properties or events, i.e. it should be legal do define a bean with a method like public String say_Hello() {}.
As a result, if there's a service method like rpc Say_hello (HelloRequest) returns (HelloReply) {} then the original stubs define a method called sayHello() whereas the stubs generated by quarkus define a method say_hello() (lowercase the first char).
So we should probably align the name generated by quarkus to align with the grpc-java compiler (although I'm not quite sure whether the behavior makes a lot of sense).
Describe the bug
I got a proto file which contains a rpc method with a underscore in the name
But the generated code is very inconsistend and cannot be compiled
e.g. in
MyServiceImplBase implements io.grpc.BindableService
itsgetServiceinfoMethod
instead ofgetServiceInfoMethod
causes
and in ``MutinyMyServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.MutinyStub
it is
delegateStub::service_info` instead of `delegateStub::serviceInfo`causes
Expected behavior
Generated code is consistent and can be compiled
Actual behavior
No response
How to Reproduce?
Download Quarkus sample for grpc.
Add proto example file with name my-service.proto into /src/main/proto, see an example above.
Run mvn package
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: