You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running breaking change detection with FILE rules, if a proto3 optional field is moved into a oneof, buf breaking correctly identifies the incompatible change, however the error messages can be a bit confusing unless someone is aware of the implementation of optionals (i.e., via a synthetic oneof).
For a message:
messageMsg {
optionalint32foo=1;
}
... changing it to:
messageMsg {
oneofbar {
int32foo=1;
}
}
... results in the following error messages:
Error: Previously present oneof "_foo" on message "Msg" was deleted.
Error: Field "1" on message "Msg" moved from oneof "_foo" to oneof "bar".
A better message could combine the two and should probably mention the optional keyword rather than the synthetic _foo oneof:
Error: Field "1" on message "Msg" changed from optional to a member of oneof "bar"
Running breaking change detection with
FILE
rules, if a proto3 optional field is moved into a oneof,buf breaking
correctly identifies the incompatible change, however the error messages can be a bit confusing unless someone is aware of the implementation of optionals (i.e., via a synthetic oneof).For a message:
... changing it to:
... results in the following error messages:
A better message could combine the two and should probably mention the
optional
keyword rather than the synthetic_foo
oneof:Related: #1906
The text was updated successfully, but these errors were encountered: