Open jjagged opened 2 hours ago
This appears to be another case of us delegating the gRPC Kotlin generation to grpc-kotlin
causing issues. I'd again think we should provide behavior that matches their expectations. In this case it's a bit nasty since we'd be generating Kotlin code dependent on Java conventions, but having java_multiple_files
set is (I think) generally considered best practice these days. In any case, this should be a relatively straightforward fix.
Related in concept to #284.
👍 All our protos have been built using ScalaPB previously, so we haven't been following java best practices that well 😄
Code generated from a gRPC proto that does not specify
option java_multiple_files = true;
doesn't compile, when generating the gRPC Kotlin stubs. See broken example project here.When using
to generate code for a proto file
hello_world_file.proto
the generated
GreeterGrpcKt
object will contain method descriptors with the outer class name as part of the parameter types.The easy solution is of course to just add the
java_multiple_files
option in our protos, but I think protokt should work in case the option is not set as well. What do you think?