Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions content/programming-guides/proto2.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,18 @@ message SearchRequest {

Deleting fields can cause serious problems if not done properly.

**Do not delete** `required` fields. This is almost impossible to do safely.

When you no longer need a field and all references have been deleted from client
code, you may delete the field definition from the message. However, you
**must** [reserve the deleted field number](#fieldreserved). If you do not
reserve the field number, it is possible for a developer to reuse that number in
the future.
**Do not delete** `required` fields. This is almost impossible to do safely. If
you must delete a `required` field, you should first mark the field `optional`
and `deprecated` and ensure that all systems which in any way observe the
message have been deployed with the new schema. Then you can consider removing
the field (but note that this is still an error-prone process).

When you no longer need a field that is not `required`, first delete all
references to the field from client code, and then delete the field definition
from the message. However, you **must**
[reserve the deleted field number](#fieldreserved). If you do not reserve the
field number, it is possible for a developer to reuse that number in the future
and cause a breakage.

You should also reserve the field name to allow JSON and TextFormat encodings of
your message to continue to parse.
Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions content/support/version-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,12 @@ described in
For specific versions supported, see
[Foundational Java Support Matrix](https://github.com/google/oss-policies-info/blob/main/foundational-java-support-matrix.md).

On Android, Protobuf supports the minimum SDK version that is supported by
[Google Play services](https://developers.google.com/android/guides/setup) and
is the default in
[Jetpack](https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-main/docs/api_guidelines/modules.md#module-minsdkversion).
If both versions differ, the lower version is supported.

## Objective-C {#objc}

The protoc version can be inferred from the Protobuf Objective-C minor version
Expand Down
Loading