Enums in proto files fail.
See original GitHub issueTesting enum types in proto messages I got the following errors:
https://github.com/maurogonzalez/rpctest/tree/enums
Using protocol.proto
And srcGen
to generate scala code.
- grpc client returns:
ERROR:
Code: Internal
Message: grpc: failed to unmarshal the received message type_enum field HelloResponse.message is not compatible with nil value
- mu client logs:
// ClientApp
...
client.sayHello(Test.HELLO)
// Server Log: INFO GreeterServiceHandler - Request: HelloRequest(GOODBYE)
// Client Log: INFO GreeterServiceClient - Request: HELLO - Result: HelloResponse(GOODBYE)
- Not sure if it is related with Scala objects and Java’s io.grpc.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Enums in proto files fail. · Issue #611 · higherkindness/mu-scala
Testing enum types in proto messages I got the following errors: ... code. grpc client returns: ERROR: Code: Internal Message: grpc: failed.
Read more >Protocol Buffer: Enum issue - java - Stack Overflow
When I try to comile it using protoc , I get the following error : proto.proto:19:5: "X" is already defined proto.proto:19:5: Note that...
Read more >Language Guide (proto3) | Protocol Buffers - Google Developers
This guide describes how to use the protocol buffer language to structure your protocol buffer data, including .proto file syntax and how to...
Read more >Protobuf: failed to parse .proto file contains negative enum ...
If a '.proto' file contains negative enum values or option values of number type in your 'Protobuf search paths', when you open any...
Read more >[protobuf] Is possible to use enum from external class in .proto ...
I want to avoid definition of same enum in every class and to avoid sync between, I have that enum in regular external...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This issue should be fixed in the latest version (v0.20.1) of mu-scala. We’ve largely rewritten the protobuf serialization library and fixed a lot of bugs, as well as improving support for protobuf enums. The mu-scala codegen will now encode enums in Scala as enumeratum
IntEnumEntry
s, meaning the serialization library can serialize them to protobuf with the correct ordinal.If you have any more problems with enums, please open a new issue.
https://github.com/higherkindness/skeuomorph/issues/100 was created to continue discussion on this issue.