Groups are always skipped in the C# proto3 code... and the wire format is 
different to other messages anyway.

Are you concerned about doing this *in general*, or do you have actual 
messages using groups that you want to parse in C#? As far as I'm aware, 
the advice has been to avoid using groups for several years now.

Jon

On Saturday, 21 May 2016 04:26:10 UTC+1, Scobe S. wrote:
>
> Given a .proto file used with proto2 to generate code to send messages, is 
> it feasible to use proto3 on the same .proto file to receive 
> messages--assuming I alter the .proto file to be proto3 compatible?
>
> In particular, if I fix the following (which currently are errors I get 
> when compiling the .proto file in proto3), then receiving messages should 
> work, right?
>
> Don't use "required" or "optional".
> Make sure enums have a zero element as the first item.
> Don't use explicit default values.
> Do not use "group".
> (These are the only errors I have.)
>
> The one I am having real doubts and questions about is getting rid of 
> "group". Using the example in the docs, I have to take something like this:
>
> message SearchResponse {
>   repeated group Result = 1 {
>     required string url = 2;
>     optional string title = 3;
>     repeated string snippets = 4;
>   }
> }
>
>
> and make it like this:
>
> message SearchResponse {
>   message Result {
>     required string url = 1;
>     optional string title = 2;
>     repeated string snippets = 3;
>   }
>   repeated Result result = 1;
> }
>
>
> But this may redefine what is expected in the data over the wire. So I 
> wonder what the best way is to replace "group" to be backward compatible.
>
> BTW, my goal is to generate C#. That's why I am using proto3.
>
> Thanks.
> Scobe
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to