Skip to content
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

Writing integers produces strange error #30

Open
vovapolu opened this issue Feb 28, 2019 · 0 comments
Open

Writing integers produces strange error #30

vovapolu opened this issue Feb 28, 2019 · 0 comments

Comments

@vovapolu
Copy link

vovapolu commented Feb 28, 2019

If I'm trying to write simple integer types like Long or Int I get the com.google.protobuf.InvalidProtocolBufferException error

import pbdirect._
1L.toPB

results to

com.google.protobuf.InvalidProtocolBufferException: While parsing a protocol message, the input ended unexpectedly in the middle of a field.  This could mean either that the input has been truncated or that an embedded message misreported its own length.

On the contrary "foobar".toPB or Array[Byte](1, 2, 3).toPB are working fine, it's quite confusing.

It should print something meaningful, or the implicit extension .toPb just shouldn't exists for these types.

@vovapolu vovapolu changed the title Converting from integers are not working Writing integers are not working Feb 28, 2019
@vovapolu vovapolu changed the title Writing integers are not working Writing integers produces strange error Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant