@@ -27,7 +27,10 @@ somewhere. Or there could be old code in another server that will break.
2727When you delete a field that's no longer used, reserve its tag number so that no
2828one accidentally re-uses it in the future. Just ` reserved 2, 3; ` is enough. No
2929type required (lets you trim dependencies!). You can also reserve names to avoid
30- recycling now-deleted field names: ` reserved "foo", "bar"; ` .
30+ recycling now-deleted field names: ` reserved foo, bar; ` . See the docs on
31+ [ reserved field numbers] ( /programming-guides/editions#fieldreserved )
32+ and
33+ [ reserved field names] ( /programming-guides/editions#reserved-field-names ) .
3134
3235<a id =" do-reserve-numbers-for-deleted-enum-values " ></a >
3336
@@ -36,7 +39,8 @@ recycling now-deleted field names: `reserved "foo", "bar";`.
3639When you delete an enum value that's no longer used, reserve its number so that
3740no one accidentally re-uses it in the future. Just ` reserved 2, 3; ` is enough.
3841You can also reserve names to avoid recycling now-deleted value names: `reserved
39- "FOO", "BAR";`.
42+ FOO, BAR;`. See also
43+ [ enum reserved values] ( /programming-guides/editions#reserved )
4044
4145<a id =" do-put-new-enum-aliases-last " ></a >
4246
@@ -67,7 +71,7 @@ To safely remove the original name (if it's being used for interchange, which it
6771
6872Almost never change the type of a field; it'll mess up deserialization, same as
6973re-using a tag number. The
70- [ protobuf docs] ( /programming-guides/proto2 #updating )
74+ [ protobuf docs] ( /programming-guides/editions #updating )
7175outline a small number of cases that are okay (for example, going between
7276` int32 ` , ` uint32 ` , ` int64 ` and ` bool ` ). However, changing a field’s message type
7377** will break** unless the new message is a superset of the old one.
@@ -118,7 +122,7 @@ less code. Note that [proto enums][proto-enums] require the first value to be
118122zero and can round-trip (deserialize, serialize) an unknown enum value.
119123
120124[ example-unspecified ] : http://cs/#search/&q=file:proto%20%22_UNSPECIFIED%20=%200%22&type=cs
121- [ proto-enums ] : /programming-guides/proto2 #enum
125+ [ proto-enums ] : /programming-guides/editions #enum
122126
123127<a id =" dont-use-cc-macro-constants-for-enum-values " ></a >
124128
0 commit comments