Skip to content

Conversation

@stromnet
Copy link

@stromnet stromnet commented Mar 4, 2015

This adds support for building with protobuf 2.6.1. For me, the main reason is that protobuf 2.5+ has OSGI headers, but other pro's with 2.6 exists. However, 2.4 and 2.6 are not proto-generated-code-compatible so I've made it optional to use 2.6.

Since ProtoUtils does some speedup-magic, special care had to be taken.
The ByteString(byte[]) constructor is gone in 2.6. Instead a new
LiteralByteString class exists.
ProtoUtils will auto-detect if this exists, and use that approach
instead.

Possible optimisation would be to ensure fastByteStringToByteArray is either a 2.4 or 2.6 implementation, rather than checking every time. Unfortunately I'm not fluent enough in scala, so I haven't quite figured out how to do that (if it is even possible)

Note that the builder must manually rebuild the protocols in
cluster/src/main/protobuf, since the generated files are NOT compatible!

Since ProtoUtils does some speedup-magic, special care had to be taken.
The ByteString(byte[]) constructor is gone in 2.6. Instead a new
LiteralByteString class exists.
ProtoUtils will auto-detect if this exists, and use that approach
instead.

Note that the builder must manually rebuild the protocols in
cluster/src/main/protobuf, since the generated files are NOT compatible!
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

Successfully merging this pull request may close these issues.

1 participant