Proto3: Can I add "optional" to an existing primitive field? Is that backwards compatible?
In order to have a primitive field differentiate between 0 and unset, I was wondering if it is possible to make it "optional" or if I need to deprecate the existing field and create a new one. So:
message foo {
int32 bar = 0;
}
Becomes either:
1)
message foo {
optional int32 bar = 0;
}
message foo {
int32 bar = 0 [deprecated = true];
optional int32 new_bar = 1
(1) would be the easier change, if backwards compatible.