hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tsuyoshi Ozawa <oz...@apache.org>
Subject Re: Can we update protobuf's version on trunk?
Date Wed, 29 Mar 2017 00:15:26 GMT
> 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 <ozawa@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-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-dev-help@hadoop.apache.org


Mime
View raw message