Skip to content

Make serializedSize field @transient #25

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

Closed
maspwr opened this issue May 22, 2015 · 3 comments
Closed

Make serializedSize field @transient #25

maspwr opened this issue May 22, 2015 · 3 comments

Comments

@maspwr
Copy link

maspwr commented May 22, 2015

ScalaPB makes beautiful case classes, but they include an extra val called serializedSize. This field makes it impossible to use a library like spray-json to automatically generate JSON formatters for these case classes. Marking the serializedSize field as @transient will resolve this issue.

https://github.com/trueaccord/ScalaPB/blob/425dd2d52a2261c5e63e392243bae8e0c97fe3e8/compiler-plugin/src/main/scala/com/trueaccord/scalapb/compiler/ProtobufGenerator.scala#L400

nadavsr added a commit that referenced this issue May 23, 2015
@maspwr
Copy link
Author

maspwr commented May 23, 2015

Awesome! Thanks for updating so fast!

@thesamet
Copy link
Contributor

This got released in 0.4.15.

@maspwr
Copy link
Author

maspwr commented Jun 1, 2015

@thesamet Works wonderfully. Thanks!

thesamet added a commit that referenced this issue May 29, 2018
use Iterable instead of Traversable
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

2 participants