Open jjagged opened 10 hours ago
gRPC Kotlin code is generated by grpc-kotlin
so that capitalization is done by them. We're not matching it and it looks like we probably should. My guess is they follow the same logic as grpc-java
, but I'd want to see if grpc-java
also does this capitalization.
Good find.
Btw, this does compile in grpc-kotlin
, but we're looking at protokt as a possible improvement
Hello!
It seems that code generated from a gRPC proto that contains an RPC name with lower case doesn't compile, when generating the gRPC Kotlin stubs. See broken example project here
When using
to generate code for a proto file
the generated
GreeterGrpc
object will get the functionwhich preserves the lower case 's'.
However, the
GreeterGrpcKt
class will reference the function with uppercase 'S'and this doesn't compile. I know that lowercase rpc names are not best practice, but it's still valid proto syntax, so protokt should support it, right?
Having looked around the code, a simple solution might be to add a
capitalizseFirstChar()
and to modifyServiceGenerator.grpcImplementations()
:What do you think?