Hello,

I came to understand that the binary serialization only concern of field 
identifiying number (hence renaming field and message is backward 
compatible).

I would like to confirm my understanding if following case is also backward 
compatible (I could not find any resource that discuss about this, or I may 
have used the incorrect search term for this).

Let's say previously I have defined a nested proto definition as follow:

message OuterProto {
   message InnerProto {
      optional bool field_bool = 1;
      optional int64 field_int = 2;
   }

   optional InnerProto field_composed = 1;
}

Now, I would like to "un-nest" the InnerProto definition by redefining 
another duplicate proto in top level as follow:

// same exact field numbering & type
message NewInnerAsTopLevelProto {
      optional bool field_bool = 1;
      optional int64 field_int = 2;
}

Would following modification to message OuterProto be backward-compatible ?

message OuterProto {
   message InnerProto {    // unused
      optional bool field_bool = 1;
      optional int64 field_int = 2;
   }

   optional NewInnerAsTopLevelProto field_composed = 1;
}

Any input & insight would be much appreciated. Thank you!

-- 
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 protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/40a99e57-b80e-4bff-bf41-0622046ec12fn%40googlegroups.com.

Reply via email to