Protobuf changes graded by Buf's breaking-change categories
Comparing two versions of a Protobuf or gRPC catalog item now grades each change under one of
Buf's four breaking-change categories: WIRE, WIRE_JSON, PACKAGE or FILE. The default is
WIRE_JSON, as before. Each explanation now starts with the category, such as [WIRE_JSON], and
says how the change grades under the other three. So you can see that renaming a field is safe on
the wire but breaks JSON clients.
- Reserved numbers and names. Removing a
reservedentry is Dangerous. Using a reserved number or name again is Breaking. A deleted field is graded by what it left reserved: Dangerous underWIREwhen its number is free, Safe once the number is reserved. - New rules, with or without
buf.json_namechanges, messages moved to another file or package, renamed or renumbered enum values,oneofmembership, andoptional/required/repeatedlabel changes are graded from the model. You no longer need abufbinary on the server to catch them. - Rule ids name the category. For example,
protobuf.wire_json.json-name-changedis safe underWIREand breaking fromWIRE_JSONup. The full table is on Compatibility modes. bufdisagreements are reported. Whenbuf breakingruns, its findings are listed next to the grades, and an explanation saysdisagreement:whenbufand these rules disagree.
You see the new grades in drift (What changed on a catalog item's Versions tab) and when you re-import a file over an existing item. Choosing the category in the API and CLI comes later.
