-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Protobuf oneof not decoding correctly #629
Comments
This is due to the way the |
So PBDirect explicitly doesn't support I have seen mentioned in other mu issues that there is a shift away from "scala as the source of source of truth". Based on my understanding of what gRPC/IDLs in general are trying to accomplish this makes a lot of sense for mu to me. As the goal of pbdirect is protobufs without the |
@dzanot I agree with you and it seems pbdirect doesn't perfectly fit in the new scenario of using the idls as a source of truth from the user's perspective. I emphasize the user's perspective because internally, the source of truth for mu are the scala models and protocols. I guess we need to find something like avrohugger but for proto. |
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 adding support for If you have any more problems with protobuf |
While doing some investigations into #606 I noticed in many cases no matter what you sent to
oneof
fields mu will interpret it as the first field. For example:Sending from a mu client
intt
or an emptystringt
, mu server will parse a boolean. A non emptystringt
will be decoded properly.Sending anything but
boolt
from thegrpcurl
client (Mu client and grpcurl are encoding the payload differently – another issue) causes the mu server to choke withjava.lang.UnsupportedOperationException: Can't read CNil
I have a simple server/client project here https://github.com/dzanot/mu-test/tree/58c628bde0f254e6a6d0f949e004e625d4000335
First you must start the server with
sbt server/run
then the tests from another sbt sessionsbt client/test
I intend to keep investigating this as part of resolving #606 is going to be sorting out defaults for oneof fields as well as enums.
The text was updated successfully, but these errors were encountered: