> We can define protobuf's version by using syntax = "proto2" or syntax
> = "proto3" in proto files with proto3 compiler. I think this is what
> Stack mentioned as compatibility mode.

I mean, "We can define protobuf's 'specification' 'version at
compilation time by using syntax = "proto2""...

- Tsuyoshi

On Wed, Mar 29, 2017 at 9:13 AM, Tsuyoshi Ozawa <oz...@apache.org> wrote:
>> Stack mentioned a compatibility mode that uses the proto2 semantics.
>
> We can define protobuf's version by using syntax = "proto2" or syntax
> = "proto3" in proto files with proto3 compiler. I think this is what
> Stack mentioned as compatibility mode.
>
> https://github.com/golang/protobuf/blob/master/proto/proto3_proto/proto3.proto#L32
>
>> Did some more googling, found this:
>>
>> https://groups.google.com/d/msg/protobuf/Z6pNo81FiEQ/fHkdcNtdAwAJ
>>
>> Feng Xiao appears to be a Google engineer, and suggests workarounds like
>> packing the fields into a byte type. No mention of a PB2 compatibility mode.
>> Also here:
>>
>> https://groups.google.com/d/msg/protobuf/bO2L6-_t91Q/-zIaJAR9AAAJ
>>
>> Participants say that unknown fields were dropped for automatic JSON
>> encoding, since you can't losslessly convert to JSON without knowing the
>> type.
>
> Feng mentions in the thread:
>> The following are the main new features in language version 3:
>
> Does it mean that, if the syntax = "proto3", there are no
> compatibility mode because of the changes of how to handle enum or
> missing fields between proto3 "specification" and proto2
> "specification"? On the other hand, if files are compiled with the
> syntax = "proto2", I think we could treat the generated files as with
> protobuf 2.x "runtime".
>
> Best
> - Tsuyoshi

---------------------------------------------------------------------
To unsubscribe, e-mail: common-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-dev-h...@hadoop.apache.org

Reply via email to