From e9feef77f0650179888d2eca82ef24ace6f09d66 Mon Sep 17 00:00:00 2001 From: Protocol Buffer Team Date: Thu, 21 Nov 2024 16:14:16 +0000 Subject: [PATCH 1/2] This documentation changes includes the following: * Renames index.md files (fixes issues with the site) * Clarifies information about deleting fields * Adds information about how the minimum SDK version is determined for Android implementations PiperOrigin-RevId: 698787294 Change-Id: Id72eefbe6519cc289fb185067b879b981df49292 --- content/editions/{_index.md => index.md} | 0 .../getting-started/{_index.md => index.md} | 0 content/news/{_index.md => index.md} | 0 .../{_index.md => index.md} | 0 content/programming-guides/proto2.md | 19 ++++++++++++------- content/reference/{_index.md => index.md} | 0 .../reference/rust/{index.md => _index.md} | 0 content/support/{_index.md => index.md} | 0 content/support/version-support.md | 6 ++++++ 9 files changed, 18 insertions(+), 7 deletions(-) rename content/editions/{_index.md => index.md} (100%) rename content/getting-started/{_index.md => index.md} (100%) rename content/news/{_index.md => index.md} (100%) rename content/programming-guides/{_index.md => index.md} (100%) rename content/reference/{_index.md => index.md} (100%) rename content/reference/rust/{index.md => _index.md} (100%) rename content/support/{_index.md => index.md} (100%) diff --git a/content/editions/_index.md b/content/editions/index.md similarity index 100% rename from content/editions/_index.md rename to content/editions/index.md diff --git a/content/getting-started/_index.md b/content/getting-started/index.md similarity index 100% rename from content/getting-started/_index.md rename to content/getting-started/index.md diff --git a/content/news/_index.md b/content/news/index.md similarity index 100% rename from content/news/_index.md rename to content/news/index.md diff --git a/content/programming-guides/_index.md b/content/programming-guides/index.md similarity index 100% rename from content/programming-guides/_index.md rename to content/programming-guides/index.md diff --git a/content/programming-guides/proto2.md b/content/programming-guides/proto2.md index eae4004c5..55b76779a 100644 --- a/content/programming-guides/proto2.md +++ b/content/programming-guides/proto2.md @@ -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. diff --git a/content/reference/_index.md b/content/reference/index.md similarity index 100% rename from content/reference/_index.md rename to content/reference/index.md diff --git a/content/reference/rust/index.md b/content/reference/rust/_index.md similarity index 100% rename from content/reference/rust/index.md rename to content/reference/rust/_index.md diff --git a/content/support/_index.md b/content/support/index.md similarity index 100% rename from content/support/_index.md rename to content/support/index.md diff --git a/content/support/version-support.md b/content/support/version-support.md index e1bf5c609..d6cbe098b 100644 --- a/content/support/version-support.md +++ b/content/support/version-support.md @@ -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 From 84d023ca20c4c0a3e3ecd4baa422423d7c1eef89 Mon Sep 17 00:00:00 2001 From: Protocol Buffer Team Date: Fri, 22 Nov 2024 21:16:00 +0000 Subject: [PATCH 2/2] This documentation changes fixes names of index.md files. PiperOrigin-RevId: 699268303 Change-Id: I321730d0f2d6f2ace962a5ed8eda90ff9a92db13 --- content/editions/{index.md => _index.md} | 0 content/getting-started/{index.md => _index.md} | 0 content/news/{index.md => _index.md} | 0 content/programming-guides/{index.md => _index.md} | 0 content/reference/{index.md => _index.md} | 0 content/support/{index.md => _index.md} | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename content/editions/{index.md => _index.md} (100%) rename content/getting-started/{index.md => _index.md} (100%) rename content/news/{index.md => _index.md} (100%) rename content/programming-guides/{index.md => _index.md} (100%) rename content/reference/{index.md => _index.md} (100%) rename content/support/{index.md => _index.md} (100%) diff --git a/content/editions/index.md b/content/editions/_index.md similarity index 100% rename from content/editions/index.md rename to content/editions/_index.md diff --git a/content/getting-started/index.md b/content/getting-started/_index.md similarity index 100% rename from content/getting-started/index.md rename to content/getting-started/_index.md diff --git a/content/news/index.md b/content/news/_index.md similarity index 100% rename from content/news/index.md rename to content/news/_index.md diff --git a/content/programming-guides/index.md b/content/programming-guides/_index.md similarity index 100% rename from content/programming-guides/index.md rename to content/programming-guides/_index.md diff --git a/content/reference/index.md b/content/reference/_index.md similarity index 100% rename from content/reference/index.md rename to content/reference/_index.md diff --git a/content/support/index.md b/content/support/_index.md similarity index 100% rename from content/support/index.md rename to content/support/_index.md