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!