Renaming is forbidden though (because JSON and textproto). In Google, it's a documented antipattern to try to make protobuf look "nice" by changing field indices, rearranging fields, etc. — the common ground is that it's better to not do it.
As long as you know the use cases of your fields, renaming is just fine. My team regularly does it. We also maintain our own serializer and deserializer json, XML, and fixed with formats. The json one we handle serialization using an annotation to say how it should be exported.
Considered breaking change because JSON serialization will change, and JSON is used quite often.
Reordering fields without changing their ID is indeed a non-breaking change from what I understand, albeit quite a useless one :)
> a useless one
If you have a (long) list of fields and you want to keep them lexicographically sorted, being able to reorder is quite useful if you rename a field.
Renaming is forbidden though (because JSON and textproto). In Google, it's a documented antipattern to try to make protobuf look "nice" by changing field indices, rearranging fields, etc. — the common ground is that it's better to not do it.
As long as you know the use cases of your fields, renaming is just fine. My team regularly does it. We also maintain our own serializer and deserializer json, XML, and fixed with formats. The json one we handle serialization using an annotation to say how it should be exported.
Depends, if you use textproto then renaming is problematic too
Shit, you're right, I'm trying to remember the one that used to trip us up all the time, maybe it was removing fields?
There was definitely one that kept tripping up the checks and it was something people like to do.