marcoferrer / kroto-plus

gRPC Kotlin Coroutines, Protobuf DSL, Scripting for Protoc
Apache License 2.0
494 stars 28 forks source link

Malformed proto sources produces output incompatible with grpc output sources #37

Closed marcoferrer closed 5 years ago

marcoferrer commented 5 years ago

When dealing with malformed proto sources the protoc-gen-grpc plugin formats service method names using a non standard transformation strategy. Currently kroto plus camel cases these names but it needs to actually emulate the same transformation strategy as the grpc plugin.

Heres an example proto that is valid when processed by the grpc plugin but invalid with krotoplus

service __malformed_SERvice_2__ {

    rpc say_hello (Message1) returns (Message2);

    rpc __sayHEloStr_eaming (stream Message1) returns (stream Message2);

    rpc _____s_a_YH_EloStr_eaming____ (stream Message1) returns (stream Message2);
}