Parcourir la source

Update protos from upstream. (#1826)

Using 276701b29e2301697f06cfcee86642b3263e93ef.

Had to leave out updating "Protos/upstream/google/protobuf/unittest_legacy_features.proto" as the
current upstream version has some issues for us.
Thomas Van Lenten il y a 7 mois
Parent
commit
c7a162b1a0
42 fichiers modifiés avec 749 ajouts et 124 suppressions
  1. 18 2
      Protos/Sources/SwiftProtobuf/google/protobuf/api.proto
  2. 3 0
      Protos/Sources/SwiftProtobuf/google/protobuf/descriptor.proto
  3. 24 0
      Protos/Sources/SwiftProtobuf/google/protobuf/type.proto
  4. 18 2
      Protos/upstream/google/protobuf/api.proto
  5. 3 0
      Protos/upstream/google/protobuf/descriptor.proto
  6. 87 50
      Protos/upstream/google/protobuf/edition_unittest.proto
  7. 2 3
      Protos/upstream/google/protobuf/internal_options.proto
  8. 1 1
      Protos/upstream/google/protobuf/late_loaded_option.proto
  9. 2 2
      Protos/upstream/google/protobuf/late_loaded_option_user.proto
  10. 3 1
      Protos/upstream/google/protobuf/map_proto3_unittest.proto
  11. 1 1
      Protos/upstream/google/protobuf/only_one_enum_test.proto
  12. 31 28
      Protos/upstream/google/protobuf/sample_messages_edition.proto
  13. 24 0
      Protos/upstream/google/protobuf/type.proto
  14. 1 1
      Protos/upstream/google/protobuf/unittest_arena.proto
  15. 37 0
      Protos/upstream/google/protobuf/unittest_custom_options_unlinked.proto
  16. 3 3
      Protos/upstream/google/protobuf/unittest_delimited.proto
  17. 1 3
      Protos/upstream/google/protobuf/unittest_delimited_import.proto
  18. 1 1
      Protos/upstream/google/protobuf/unittest_drop_unknown_fields.proto
  19. 3 1
      Protos/upstream/google/protobuf/unittest_features.proto
  20. 31 0
      Protos/upstream/google/protobuf/unittest_import_option.proto
  21. 1 1
      Protos/upstream/google/protobuf/unittest_lazy_dependencies.proto
  22. 1 1
      Protos/upstream/google/protobuf/unittest_lazy_dependencies_custom_option.proto
  23. 3 1
      Protos/upstream/google/protobuf/unittest_lazy_dependencies_enum.proto
  24. 10 0
      Protos/upstream/google/protobuf/unittest_lite_edition_2024.proto
  25. 11 9
      Protos/upstream/google/protobuf/unittest_no_field_presence.proto
  26. 5 1
      Protos/upstream/google/protobuf/unittest_preserve_unknown_enum.proto
  27. 3 1
      Protos/upstream/google/protobuf/unittest_preserve_unknown_enum2.proto
  28. 1 1
      Protos/upstream/google/protobuf/unittest_redaction.proto
  29. 2 2
      Protos/upstream/google/protobuf/unittest_string_type.proto
  30. 1 5
      Protos/upstream/google/protobuf/unittest_string_view.proto
  31. 20 0
      Reference/Sources/SwiftProtobuf/google/protobuf/api.pb.swift
  32. 1 1
      Reference/Sources/SwiftProtobuf/google/protobuf/descriptor.pb.swift
  33. 24 0
      Reference/Sources/SwiftProtobuf/google/protobuf/type.pb.swift
  34. 20 0
      Reference/upstream/google/protobuf/api.pb.swift
  35. 1 1
      Reference/upstream/google/protobuf/descriptor.pb.swift
  36. 24 0
      Reference/upstream/google/protobuf/type.pb.swift
  37. 129 0
      Reference/upstream/google/protobuf/unittest_custom_options_unlinked.pb.swift
  38. 92 0
      Reference/upstream/google/protobuf/unittest_import_option.pb.swift
  39. 61 0
      Reference/upstream/google/protobuf/unittest_lite_edition_2024.pb.swift
  40. 20 0
      Sources/SwiftProtobuf/api.pb.swift
  41. 1 1
      Sources/SwiftProtobuf/descriptor.pb.swift
  42. 24 0
      Sources/SwiftProtobuf/type.pb.swift

+ 18 - 2
Protos/Sources/SwiftProtobuf/google/protobuf/api.proto

@@ -51,6 +51,11 @@ option go_package = "google.golang.org/protobuf/types/known/apipb";
 // sometimes simply referred to as "APIs" in other contexts, such as the name of
 // this message itself. See https://cloud.google.com/apis/design/glossary for
 // detailed terminology.
+//
+// New usages of this message as an alternative to ServiceDescriptorProto are
+// strongly discouraged. This message does not reliability preserve all
+// information necessary to model the schema and preserve semantics. Instead
+// make use of FileDescriptorSet which preserves the necessary information.
 message Api {
   // The fully qualified name of this interface, including package name
   // followed by the interface's simple name.
@@ -99,6 +104,11 @@ message Api {
 }
 
 // Method represents a method of an API interface.
+//
+// New usages of this message as an alternative to MethodDescriptorProto are
+// strongly discouraged. This message does not reliability preserve all
+// information necessary to model the schema and preserve semantics. Instead
+// make use of FileDescriptorSet which preserves the necessary information.
 message Method {
   // The simple name of this method.
   string name = 1;
@@ -119,10 +129,16 @@ message Method {
   repeated Option options = 6;
 
   // The source syntax of this method.
-  Syntax syntax = 7;
+  //
+  // This field should be ignored, instead the syntax should be inherited from
+  // Api. This is similar to Field and EnumValue.
+  Syntax syntax = 7 [deprecated = true];
 
   // The source edition string, only valid when syntax is SYNTAX_EDITIONS.
-  string edition = 8;
+  //
+  // This field should be ignored, instead the edition should be inherited from
+  // Api. This is similar to Field and EnumValue.
+  string edition = 8 [deprecated = true];
 }
 
 // Declares an API Interface to be included in this interface. The including

+ 3 - 0
Protos/Sources/SwiftProtobuf/google/protobuf/descriptor.proto

@@ -398,6 +398,9 @@ message ServiceDescriptorProto {
   repeated MethodDescriptorProto method = 2;
 
   optional ServiceOptions options = 3;
+
+  reserved 4;
+  reserved "stream";
 }
 
 // Describes a method of a service.

+ 24 - 0
Protos/Sources/SwiftProtobuf/google/protobuf/type.proto

@@ -44,6 +44,11 @@ option csharp_namespace = "Google.Protobuf.WellKnownTypes";
 option go_package = "google.golang.org/protobuf/types/known/typepb";
 
 // A protocol buffer message type.
+//
+// New usages of this message as an alternative to DescriptorProto are strongly
+// discouraged. This message does not reliability preserve all information
+// necessary to model the schema and preserve semantics. Instead make use of
+// FileDescriptorSet which preserves the necessary information.
 message Type {
   // The fully qualified message name.
   string name = 1;
@@ -62,6 +67,11 @@ message Type {
 }
 
 // A single field of a message type.
+//
+// New usages of this message as an alternative to FieldDescriptorProto are
+// strongly discouraged. This message does not reliability preserve all
+// information necessary to model the schema and preserve semantics. Instead
+// make use of FileDescriptorSet which preserves the necessary information.
 message Field {
   // Basic field types.
   enum Kind {
@@ -142,6 +152,11 @@ message Field {
 }
 
 // Enum type definition.
+//
+// New usages of this message as an alternative to EnumDescriptorProto are
+// strongly discouraged. This message does not reliability preserve all
+// information necessary to model the schema and preserve semantics. Instead
+// make use of FileDescriptorSet which preserves the necessary information.
 message Enum {
   // Enum type name.
   string name = 1;
@@ -158,6 +173,11 @@ message Enum {
 }
 
 // Enum value definition.
+//
+// New usages of this message as an alternative to EnumValueDescriptorProto are
+// strongly discouraged. This message does not reliability preserve all
+// information necessary to model the schema and preserve semantics. Instead
+// make use of FileDescriptorSet which preserves the necessary information.
 message EnumValue {
   // Enum value name.
   string name = 1;
@@ -169,6 +189,10 @@ message EnumValue {
 
 // A protocol buffer option, which can be attached to a message, field,
 // enumeration, etc.
+//
+// New usages of this message as an alternative to FileOptions, MessageOptions,
+// FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions
+// are strongly discouraged.
 message Option {
   // The option's name. For protobuf built-in options (options defined in
   // descriptor.proto), this is the short name. For example, `"map_entry"`.

+ 18 - 2
Protos/upstream/google/protobuf/api.proto

@@ -51,6 +51,11 @@ option go_package = "google.golang.org/protobuf/types/known/apipb";
 // sometimes simply referred to as "APIs" in other contexts, such as the name of
 // this message itself. See https://cloud.google.com/apis/design/glossary for
 // detailed terminology.
+//
+// New usages of this message as an alternative to ServiceDescriptorProto are
+// strongly discouraged. This message does not reliability preserve all
+// information necessary to model the schema and preserve semantics. Instead
+// make use of FileDescriptorSet which preserves the necessary information.
 message Api {
   // The fully qualified name of this interface, including package name
   // followed by the interface's simple name.
@@ -99,6 +104,11 @@ message Api {
 }
 
 // Method represents a method of an API interface.
+//
+// New usages of this message as an alternative to MethodDescriptorProto are
+// strongly discouraged. This message does not reliability preserve all
+// information necessary to model the schema and preserve semantics. Instead
+// make use of FileDescriptorSet which preserves the necessary information.
 message Method {
   // The simple name of this method.
   string name = 1;
@@ -119,10 +129,16 @@ message Method {
   repeated Option options = 6;
 
   // The source syntax of this method.
-  Syntax syntax = 7;
+  //
+  // This field should be ignored, instead the syntax should be inherited from
+  // Api. This is similar to Field and EnumValue.
+  Syntax syntax = 7 [deprecated = true];
 
   // The source edition string, only valid when syntax is SYNTAX_EDITIONS.
-  string edition = 8;
+  //
+  // This field should be ignored, instead the edition should be inherited from
+  // Api. This is similar to Field and EnumValue.
+  string edition = 8 [deprecated = true];
 }
 
 // Declares an API Interface to be included in this interface. The including

+ 3 - 0
Protos/upstream/google/protobuf/descriptor.proto

@@ -398,6 +398,9 @@ message ServiceDescriptorProto {
   repeated MethodDescriptorProto method = 2;
 
   optional ServiceOptions options = 3;
+
+  reserved 4;
+  reserved "stream";
 }
 
 // Describes a method of a service.

+ 87 - 50
Protos/upstream/google/protobuf/edition_unittest.proto

@@ -14,13 +14,14 @@
 //
 // LINT: ALLOW_GROUPS, LEGACY_NAMES
 
-edition = "2023";
+edition = "2024";
 
-import "google/protobuf/cpp_features.proto";
+import "google/protobuf/unittest_import.proto";
+
+import option "google/protobuf/cpp_features.proto";
 
 option features.field_presence = EXPLICIT;
 option features.enum_type = CLOSED;
-option features.(pb.cpp).string_type = VIEW;
 
 // Some generic_services option(s) added automatically.
 // See:  http://go/proto2-generic-services-default
@@ -29,8 +30,6 @@ option java_generic_services = true;   // auto-added
 option py_generic_services = true;     // auto-added
 option cc_enable_arenas = true;
 
-import "google/protobuf/unittest_import.proto";
-
 // We don't put this in a package within proto2 because we need to make sure
 // that the generated code doesn't depend on being in the proto2 namespace.
 // In test_util.h we do "using namespace unittest = edition_unittest".
@@ -89,9 +88,9 @@ message TestAllTypes {
   ForeignEnum                          optional_foreign_enum    = 22;
   proto2_unittest_import.ImportEnum    optional_import_enum     = 23;
 
-  string optional_string_piece = 24 [ctype=STRING_PIECE];
-  string optional_cord = 25 [ctype=CORD];
-  bytes optional_bytes_cord = 86 [ctype=CORD];
+  string optional_string_piece = 24;
+  string optional_cord = 25 [features.(pb.cpp).string_type=CORD];
+  bytes optional_bytes_cord = 86 [features.(pb.cpp).string_type=CORD];
 
   // Defined in unittest_import_public.proto
   proto2_unittest_import.PublicImportMessage
@@ -131,8 +130,8 @@ message TestAllTypes {
   repeated ForeignEnum                          repeated_foreign_enum    = 52;
   repeated proto2_unittest_import.ImportEnum    repeated_import_enum     = 53;
 
-  repeated string repeated_string_piece = 54 [ctype=STRING_PIECE];
-  repeated string repeated_cord = 55 [ctype=CORD];
+  repeated string repeated_string_piece = 54;
+  repeated string repeated_cord = 55 [features.(pb.cpp).string_type=CORD];
 
   repeated NestedMessage repeated_lazy_message = 57 ;
 
@@ -158,8 +157,8 @@ message TestAllTypes {
   proto2_unittest_import.ImportEnum
       default_import_enum = 83 [default = IMPORT_BAR];
 
-  string default_string_piece = 84 [ctype=STRING_PIECE,default="abc"];
-  string default_cord = 85 [ctype=CORD,default="123"];
+  string default_string_piece = 84 [default="abc"];
+  string default_cord = 85 [features.(pb.cpp).string_type=CORD,default="123"];
 
   // For oneof test
   oneof oneof_field {
@@ -167,8 +166,8 @@ message TestAllTypes {
     NestedMessage oneof_nested_message = 112;
     string oneof_string = 113;
     bytes oneof_bytes = 114;
-    string oneof_cord = 115 [ctype=CORD];
-    string oneof_string_piece = 116 [ctype=STRING_PIECE];
+    string oneof_cord = 115 [features.(pb.cpp).string_type=CORD];
+    string oneof_string_piece = 116;
     NestedMessage oneof_lazy_nested_message = 117 [lazy=true];
   }
 }
@@ -224,13 +223,17 @@ message TestAllExtensions {
   extensions 1 to max;
 }
 
-  message OptionalGroup_extension {
-    int32 a = 17;
-  }
+message OptionalGroup_extension {
+  option features.enforce_naming_style = STYLE_LEGACY;
 
-  message RepeatedGroup_extension {
-    int32 a = 47;
-  }
+  int32 a = 17;
+}
+
+message RepeatedGroup_extension {
+  option features.enforce_naming_style = STYLE_LEGACY;
+
+  int32 a = 47;
+}
 
 extend TestAllExtensions {
   // Singular
@@ -263,7 +266,7 @@ extend TestAllExtensions {
   proto2_unittest_import.ImportEnum
     optional_import_enum_extension = 23;
 
-  string optional_string_piece_extension = 24 [ctype=STRING_PIECE];
+  string optional_string_piece_extension = 24;
   // TODO: ctype=CORD is not supported for extension. Add
   // ctype=CORD option back after it is supported.
   string optional_cord_extension = 25;
@@ -307,7 +310,7 @@ extend TestAllExtensions {
   repeated proto2_unittest_import.ImportEnum
     repeated_import_enum_extension = 53;
 
-  repeated string repeated_string_piece_extension = 54 [ctype=STRING_PIECE];
+  repeated string repeated_string_piece_extension = 54;
   // TODO: ctype=CORD is not supported for extension. Add
   // ctype=CORD option back after it is supported.
   repeated string repeated_cord_extension = 55;
@@ -339,8 +342,7 @@ extend TestAllExtensions {
   proto2_unittest_import.ImportEnum
     default_import_enum_extension = 83 [default = IMPORT_BAR];
 
-  string default_string_piece_extension = 84
-      [ctype=STRING_PIECE, default="abc"];
+  string default_string_piece_extension = 84 [default="abc"];
   // TODO: ctype=CORD is not supported for extension. Add
   // ctype=CORD option back after it is supported.
   string default_cord_extension = 85 [default="123"];
@@ -387,9 +389,12 @@ message TestNestedExtension {
     string nested_string_extension = 1003;
   }
 
-    message OptionalGroup_extension {
-      int32 a = 17;
-    }
+  message OptionalGroup_extension {
+    option features.enforce_naming_style = STYLE_LEGACY;
+
+    int32 a = 17;
+  }
+
   extend TestGroupExtension {
     OptionalGroup_extension optionalgroup_extension = 16
         [features.message_encoding = DELIMITED];
@@ -461,6 +466,7 @@ message TestRequiredEnumMulti {
     BAR = 2;
     BAZ = 100;
   }
+  option features.enforce_naming_style = STYLE_LEGACY;
 
   // Intentionally placed in descending field number to force sorting in closed
   // enum verification.
@@ -477,6 +483,7 @@ message TestRequiredNoMaskMulti {
     BAR = 2;
     BAZ = 100;
   }
+  option features.enforce_naming_style = STYLE_LEGACY;
 
   // Intentionally placed in descending field number to force sorting in closed
   // enum verification. Also, using large field numbers to use tag only
@@ -713,19 +720,21 @@ enum TestSparseEnum {
 // Test message with CamelCase field names.  This violates Protocol Buffer
 // standard style.
 message TestCamelCaseFieldNames {
+  option features.enforce_naming_style = STYLE_LEGACY;
+
   int32 PrimitiveField = 1;
   string StringField = 2;
   ForeignEnum EnumField = 3;
   ForeignMessage MessageField = 4;
-  string StringPieceField = 5 [ctype=STRING_PIECE];
-  string CordField = 6 [ctype=CORD];
+  string StringPieceField = 5;
+  string CordField = 6 [features.(pb.cpp).string_type=CORD];
 
   repeated int32 RepeatedPrimitiveField = 7;
   repeated string RepeatedStringField = 8;
   repeated ForeignEnum RepeatedEnumField = 9;
   repeated ForeignMessage RepeatedMessageField = 10;
-  repeated string RepeatedStringPieceField = 11 [ctype=STRING_PIECE];
-  repeated string RepeatedCordField = 12 [ctype=CORD];
+  repeated string RepeatedStringPieceField = 11;
+  repeated string RepeatedCordField = 12 [features.(pb.cpp).string_type=CORD];
 }
 
 
@@ -815,9 +824,8 @@ message TestExtremeDefaultValues {
   // String defaults containing the character '\000'
   string string_with_zero       = 23 [default = "hel\000lo"];
    bytes bytes_with_zero        = 24 [default = "wor\000ld"];
-  string string_piece_with_zero = 25 [ctype=STRING_PIECE,
-                                               default="ab\000c"];
-  string cord_with_zero         = 26 [ctype=CORD,
+  string string_piece_with_zero = 25 [default="ab\000c"];
+  string cord_with_zero         = 26 [features.(pb.cpp).string_type=CORD,
                                                default="12\0003"];
   string replacement_string     = 27 [default="${unknown}"];
 }
@@ -932,27 +940,26 @@ message TestOneof2 {
   oneof foo {
     int32 foo_int = 1;
     string foo_string = 2;
-    string foo_cord = 3 [ctype=CORD];
-    string foo_string_piece = 4 [ctype=STRING_PIECE];
+    string foo_cord = 3 [features.(pb.cpp).string_type=CORD];
+    string foo_string_piece = 4;
     bytes foo_bytes = 5;
     NestedEnum foo_enum = 6;
     NestedMessage foo_message = 7;
     FooGroup foogroup = 8 [features.message_encoding = DELIMITED];
     NestedMessage foo_lazy_message = 11 [lazy=true];
-    bytes foo_bytes_cord = 30 [ctype=CORD];
+    bytes foo_bytes_cord = 30 [features.(pb.cpp).string_type=CORD];
   }
 
   oneof bar {
     int32 bar_int = 12 [default = 5];
     string bar_string = 13 [default = "STRING"];
-    string bar_cord = 14 [ctype=CORD, default = "CORD"];
-    string bar_string_piece = 15 [ctype=STRING_PIECE, default = "SPIECE"];
+    string bar_cord = 14 [features.(pb.cpp).string_type=CORD, default = "CORD"];
+    string bar_string_piece = 15 [default = "SPIECE"];
     bytes bar_bytes = 16 [default = "BYTES"];
     NestedEnum bar_enum = 17 [default = BAR];
     string bar_string_with_empty_default = 20 [default = ""];
-    string bar_cord_with_empty_default = 21 [ctype=CORD, default = ""];
-    string bar_string_piece_with_empty_default = 22
-        [ctype=STRING_PIECE, default = ""];
+    string bar_cord_with_empty_default = 21 [features.(pb.cpp).string_type=CORD, default = ""];
+    string bar_string_piece_with_empty_default = 22 [default = ""];
     bytes bar_bytes_with_empty_default = 23 [default = ""];
   }
 
@@ -1197,17 +1204,17 @@ message BarResponse {}
 
 message TestJsonName {
   int32 field_name1 = 1;
-  int32 fieldName2 = 2;
-  int32 FieldName3 = 3;
-  int32 _field_name4 = 4;
-  int32 FIELD_NAME5 = 5;
+  int32 fieldName2 = 2 [features.enforce_naming_style = STYLE_LEGACY];
+  int32 FieldName3 = 3 [features.enforce_naming_style = STYLE_LEGACY];
+  int32 _field_name4 = 4 [features.enforce_naming_style = STYLE_LEGACY];
+  int32 FIELD_NAME5 = 5 [features.enforce_naming_style = STYLE_LEGACY];
   int32 field_name6 = 6 [json_name = "@type"];
   int32 fieldname7 = 7;
 }
 
 message TestHugeFieldNumbers {
   int32 optional_int32 = 536870000;
-  int32 fixed_32 = 536870001;
+  int32 fixed_32 = 536870001 [features.enforce_naming_style = STYLE_LEGACY];
   repeated int32 repeated_int32 = 536870002 [features.repeated_field_encoding = EXPANDED];
   repeated int32 packed_int32 = 536870003 [features.repeated_field_encoding = PACKED];
 
@@ -1293,6 +1300,8 @@ extend TestNestedGroupExtensionOuter.Layer1OptionalGroup.Layer2RepeatedGroup {
 }
 
 enum VeryLargeEnum {
+  option features.enforce_naming_style = STYLE_LEGACY;
+
   ENUM_LABEL_DEFAULT = 0;
   ENUM_LABEL_1 = 1;
   ENUM_LABEL_2 = 2;
@@ -1425,6 +1434,8 @@ message TestExtensionRangeSerialize {
 }
 
 message TestVerifyInt32Simple {
+    option features.enforce_naming_style = STYLE_LEGACY;
+
     int32 optional_int32_1 = 1;
     int32 optional_int32_2 = 2;
     int32 optional_int32_63 = 63;
@@ -1432,6 +1443,8 @@ message TestVerifyInt32Simple {
 }
 
 message TestVerifyInt32 {
+    option features.enforce_naming_style = STYLE_LEGACY;
+
     int32 optional_int32_1 = 1;
     int32 optional_int32_2 = 2;
     int32 optional_int32_63 = 63;
@@ -1442,6 +1455,8 @@ message TestVerifyInt32 {
 }
 
 message TestVerifyMostlyInt32 {
+    option features.enforce_naming_style = STYLE_LEGACY;
+
     int64 optional_int64_30 = 30;
 
     int32 optional_int32_1 = 1;
@@ -1456,6 +1471,8 @@ message TestVerifyMostlyInt32 {
 }
 
 message TestVerifyMostlyInt32BigFieldNumber {
+    option features.enforce_naming_style = STYLE_LEGACY;
+
     int64 optional_int64_30 = 30;
     int32 optional_int32_300 = 300;
 
@@ -1471,6 +1488,8 @@ message TestVerifyMostlyInt32BigFieldNumber {
 }
 
 message TestVerifyUint32Simple {
+    option features.enforce_naming_style = STYLE_LEGACY;
+
     uint32 optional_uint32_1 = 1;
     uint32 optional_uint32_2 = 2;
     uint32 optional_uint32_63 = 63;
@@ -1478,6 +1497,8 @@ message TestVerifyUint32Simple {
 }
 
 message TestVerifyUint32 {
+    option features.enforce_naming_style = STYLE_LEGACY;
+
     uint32 optional_uint32_1 = 1;
     uint32 optional_uint32_2 = 2;
     uint32 optional_uint32_63 = 63;
@@ -1488,6 +1509,8 @@ message TestVerifyUint32 {
 }
 
 message TestVerifyOneUint32 {
+    option features.enforce_naming_style = STYLE_LEGACY;
+
     uint32 optional_uint32_1 = 1;
     int32 optional_int32_2 = 2;
     int32 optional_int32_63 = 63;
@@ -1498,6 +1521,8 @@ message TestVerifyOneUint32 {
 }
 
 message TestVerifyOneInt32BigFieldNumber {
+    option features.enforce_naming_style = STYLE_LEGACY;
+
     int32 optional_int32_65 = 65;
 
     int64 optional_int64_1 = 1;
@@ -1510,6 +1535,8 @@ message TestVerifyOneInt32BigFieldNumber {
 }
 
 message TestVerifyInt32BigFieldNumber {
+    option features.enforce_naming_style = STYLE_LEGACY;
+
     int32 optional_int32_1000 = 1000;
     int32 optional_int32_65 = 65;
 
@@ -1523,6 +1550,8 @@ message TestVerifyInt32BigFieldNumber {
 }
 
 message TestVerifyUint32BigFieldNumber {
+    option features.enforce_naming_style = STYLE_LEGACY;
+
     uint32 optional_uint32_1000 = 1000;
     uint32 optional_uint32_65 = 65;
 
@@ -1537,6 +1566,8 @@ message TestVerifyUint32BigFieldNumber {
 
 message TestVerifyBigFieldNumberUint32 {
   message Nested {
+    option features.enforce_naming_style = STYLE_LEGACY;
+
     uint32 optional_uint32_5000 = 5000;
     uint32 optional_uint32_1000 = 1000;
     uint32 optional_uint32_66 = 66;
@@ -1556,6 +1587,8 @@ message TestVerifyBigFieldNumberUint32 {
 // This message contains different kind of enums to exercise the different
 // parsers in table-driven.
 message EnumParseTester {
+  option features.enforce_naming_style = STYLE_LEGACY;
+
   enum SeqSmall0 {
     SEQ_SMALL_0_DEFAULT = 0;
     SEQ_SMALL_0_1 = 1;
@@ -1594,6 +1627,8 @@ message EnumParseTester {
       [features.repeated_field_encoding = PACKED];
 
   enum SeqLarge {
+    option features.enforce_naming_style = STYLE_LEGACY;
+
     SEQ_LARGE_DEFAULT = -1;
     SEQ_LARGE_0 = 0;
     SEQ_LARGE_1 = 1;
@@ -1784,7 +1819,7 @@ message StringParseTester {
 }
 
 message BadFieldNames{
-  int32 OptionalInt32 = 1;
+  int32 OptionalInt32 = 1 [features.enforce_naming_style = STYLE_LEGACY];
   int32 for = 2;
 }
 
@@ -1808,8 +1843,8 @@ message RedactedFields {
 }
 
 message TestCord{
-  bytes optional_bytes_cord = 1 [ctype=CORD];
-  bytes optional_bytes_cord_default = 2 [ctype=CORD, default = "hello"];
+  bytes optional_bytes_cord = 1 [features.(pb.cpp).string_type = CORD];
+  bytes optional_bytes_cord_default = 2 [features.(pb.cpp).string_type = CORD, default = "hello"];
 }
 
 message TestPackedEnumSmallRange {
@@ -1883,6 +1918,8 @@ message EnumsForBenchmark {
 }
 
 message TestMessageWithManyRepeatedPtrFields {
+  option features.enforce_naming_style = STYLE_LEGACY;
+
   repeated string repeated_string_1 = 1;
   repeated string repeated_string_2 = 2;
   repeated string repeated_string_3 = 3;

+ 2 - 3
Protos/upstream/google/protobuf/internal_options.proto

@@ -5,7 +5,7 @@
 // license that can be found in the LICENSE file or at
 // https://developers.google.com/open-source/licenses/bsd
 
-edition = "2023";
+edition = "2024";
 
 package pb;
 
@@ -24,8 +24,7 @@ message InternalOptionsForce {
   }
 }
 
-message InternalFieldOptionsCpp {
-}
+message InternalFieldOptionsCpp {}
 
 message InternalFieldOptions {
   InternalFieldOptionsCpp cpp = 1;

+ 1 - 1
Protos/upstream/google/protobuf/late_loaded_option.proto

@@ -1,4 +1,4 @@
-edition = "2023";
+edition = "2024";
 
 package proto2_unittest;
 

+ 2 - 2
Protos/upstream/google/protobuf/late_loaded_option_user.proto

@@ -1,8 +1,8 @@
-edition = "2023";
+edition = "2024";
 
 package proto2_unittest;
 
-import "google/protobuf/late_loaded_option.proto";
+import option "google/protobuf/late_loaded_option.proto";
 
 message LateLoadedOptionUser {
   option (proto2_unittest.LateLoadedOption.ext) = {

+ 3 - 1
Protos/upstream/google/protobuf/map_proto3_unittest.proto

@@ -5,7 +5,7 @@
 // license that can be found in the LICENSE file or at
 // https://developers.google.com/open-source/licenses/bsd
 
-edition = "2023";
+edition = "2024";
 
 // Treat all fields as implicit present by default (proto3 behavior).
 option features.field_presence = IMPLICIT;
@@ -23,5 +23,7 @@ message TestProto3BytesMap {
 }
 
 message TestI32StrMap {
+  option features.enforce_naming_style = STYLE_LEGACY;
+
   map<int32, string> m_32_str = 1;
 }

+ 1 - 1
Protos/upstream/google/protobuf/only_one_enum_test.proto

@@ -1,4 +1,4 @@
-edition = "2023";
+edition = "2024";
 
 package proto2_unittest;
 

+ 31 - 28
Protos/upstream/google/protobuf/sample_messages_edition.proto

@@ -7,14 +7,13 @@
 //
 // Sample messages to generate example code.
 
-edition = "2023";
+edition = "2024";
 
 package protobuf_test_messages.edition;
 
-import "google/protobuf/cpp_features.proto";
-
 option optimize_for = SPEED;
-option features.(pb.cpp).string_type = VIEW;
+
+import option "google/protobuf/cpp_features.proto";
 
 // This proto includes every type of field in both singular and repeated
 // forms.
@@ -59,8 +58,8 @@ message TestAllTypesEdition {
   NestedEnum optional_nested_enum = 21;
   ForeignEnumEdition optional_foreign_enum = 22;
 
-  string optional_string_piece = 24 [ctype = STRING_PIECE];
-  string optional_cord = 25 [ctype = CORD];
+  string optional_string_piece = 24;
+  string optional_cord = 25 [features.(pb.cpp).string_type = CORD];
 
   TestAllTypesEdition recursive_message = 27;
 
@@ -87,8 +86,8 @@ message TestAllTypesEdition {
   repeated NestedEnum repeated_nested_enum = 51;
   repeated ForeignEnumEdition repeated_foreign_enum = 52;
 
-  repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
-  repeated string repeated_cord = 55 [ctype = CORD];
+  repeated string repeated_string_piece = 54;
+  repeated string repeated_cord = 55 [features.(pb.cpp).string_type = CORD];
 
   // Packed
   repeated int32 packed_int32 = 75 [features.repeated_field_encoding = PACKED];
@@ -210,23 +209,23 @@ message TestAllTypesEdition {
   // Test field-name-to-JSON-name convention.
   // (protobuf says names can be any valid C/C++ identifier.)
   int32 fieldname1 = 401;
-  int32 field_name2 = 402;
-  int32 _field_name3 = 403;
-  int32 field__name4_ = 404;
-  int32 field0name5 = 405;
-  int32 field_0_name6 = 406;
-  int32 fieldName7 = 407;
-  int32 FieldName8 = 408;
-  int32 field_Name9 = 409;
-  int32 Field_Name10 = 410;
-  int32 FIELD_NAME11 = 411;
-  int32 FIELD_name12 = 412;
-  int32 __field_name13 = 413;
-  int32 __Field_name14 = 414;
-  int32 field__name15 = 415;
-  int32 field__Name16 = 416;
-  int32 field_name17__ = 417;
-  int32 Field_name18__ = 418;
+  int32 field_name2 = 402 [features.enforce_naming_style = STYLE_LEGACY];
+  int32 _field_name3 = 403 [features.enforce_naming_style = STYLE_LEGACY];
+  int32 field__name4_ = 404 [features.enforce_naming_style = STYLE_LEGACY];
+  int32 field0name5 = 405 [features.enforce_naming_style = STYLE_LEGACY];
+  int32 field_0_name6 = 406 [features.enforce_naming_style = STYLE_LEGACY];
+  int32 fieldName7 = 407 [features.enforce_naming_style = STYLE_LEGACY];
+  int32 FieldName8 = 408 [features.enforce_naming_style = STYLE_LEGACY];
+  int32 field_Name9 = 409 [features.enforce_naming_style = STYLE_LEGACY];
+  int32 Field_Name10 = 410 [features.enforce_naming_style = STYLE_LEGACY];
+  int32 FIELD_NAME11 = 411 [features.enforce_naming_style = STYLE_LEGACY];
+  int32 FIELD_name12 = 412 [features.enforce_naming_style = STYLE_LEGACY];
+  int32 __field_name13 = 413 [features.enforce_naming_style = STYLE_LEGACY];
+  int32 __Field_name14 = 414 [features.enforce_naming_style = STYLE_LEGACY];
+  int32 field__name15 = 415 [features.enforce_naming_style = STYLE_LEGACY];
+  int32 field__Name16 = 416 [features.enforce_naming_style = STYLE_LEGACY];
+  int32 field_name17__ = 417 [features.enforce_naming_style = STYLE_LEGACY];
+  int32 Field_name18__ = 418 [features.enforce_naming_style = STYLE_LEGACY];
 
   // Reserved for unknown fields test.
   reserved 1000 to 9999;
@@ -283,6 +282,8 @@ message NullHypothesisEdition {}
 
 message EnumOnlyEdition {
   enum Bool {
+    option features.enforce_naming_style = STYLE_LEGACY;
+
     kFalse = 0;
     kTrue = 1;
   }
@@ -341,9 +342,11 @@ message TestAllRequiredTypesEdition {
       [features.field_presence = LEGACY_REQUIRED];
 
   string required_string_piece = 24
-      [ctype = STRING_PIECE, features.field_presence = LEGACY_REQUIRED];
-  string required_cord = 25
-      [ctype = CORD, features.field_presence = LEGACY_REQUIRED];
+      [features.field_presence = LEGACY_REQUIRED];
+  string required_cord = 25 [
+    features.(pb.cpp).string_type = CORD,
+    features.field_presence = LEGACY_REQUIRED
+  ];
 
   TestAllRequiredTypesEdition recursive_message = 27;
   TestAllRequiredTypesEdition optional_recursive_message = 28;

+ 24 - 0
Protos/upstream/google/protobuf/type.proto

@@ -44,6 +44,11 @@ option csharp_namespace = "Google.Protobuf.WellKnownTypes";
 option go_package = "google.golang.org/protobuf/types/known/typepb";
 
 // A protocol buffer message type.
+//
+// New usages of this message as an alternative to DescriptorProto are strongly
+// discouraged. This message does not reliability preserve all information
+// necessary to model the schema and preserve semantics. Instead make use of
+// FileDescriptorSet which preserves the necessary information.
 message Type {
   // The fully qualified message name.
   string name = 1;
@@ -62,6 +67,11 @@ message Type {
 }
 
 // A single field of a message type.
+//
+// New usages of this message as an alternative to FieldDescriptorProto are
+// strongly discouraged. This message does not reliability preserve all
+// information necessary to model the schema and preserve semantics. Instead
+// make use of FileDescriptorSet which preserves the necessary information.
 message Field {
   // Basic field types.
   enum Kind {
@@ -142,6 +152,11 @@ message Field {
 }
 
 // Enum type definition.
+//
+// New usages of this message as an alternative to EnumDescriptorProto are
+// strongly discouraged. This message does not reliability preserve all
+// information necessary to model the schema and preserve semantics. Instead
+// make use of FileDescriptorSet which preserves the necessary information.
 message Enum {
   // Enum type name.
   string name = 1;
@@ -158,6 +173,11 @@ message Enum {
 }
 
 // Enum value definition.
+//
+// New usages of this message as an alternative to EnumValueDescriptorProto are
+// strongly discouraged. This message does not reliability preserve all
+// information necessary to model the schema and preserve semantics. Instead
+// make use of FileDescriptorSet which preserves the necessary information.
 message EnumValue {
   // Enum value name.
   string name = 1;
@@ -169,6 +189,10 @@ message EnumValue {
 
 // A protocol buffer option, which can be attached to a message, field,
 // enumeration, etc.
+//
+// New usages of this message as an alternative to FileOptions, MessageOptions,
+// FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions
+// are strongly discouraged.
 message Option {
   // The option's name. For protobuf built-in options (options defined in
   // descriptor.proto), this is the short name. For example, `"map_entry"`.

+ 1 - 1
Protos/upstream/google/protobuf/unittest_arena.proto

@@ -5,7 +5,7 @@
 // license that can be found in the LICENSE file or at
 // https://developers.google.com/open-source/licenses/bsd
 
-edition = "2023";
+edition = "2024";
 
 package proto2_arena_unittest;
 

+ 37 - 0
Protos/upstream/google/protobuf/unittest_custom_options_unlinked.proto

@@ -0,0 +1,37 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+
+// Author: benjy@google.com (Benjy Weinberger)
+//  Based on original Protocol Buffers design by
+//  Sanjay Ghemawat, Jeff Dean, and others.
+//
+// A proto file used to test the "custom options" feature when not linked in.
+
+edition = "2024";
+
+// A custom file option (defined below).
+option (file_opt1) = 9876543210;
+
+import "google/protobuf/descriptor.proto";
+
+// We don't put this in a package within proto2 because we need to make sure
+// that the generated code doesn't depend on being in the proto2 namespace.
+package proto2_unittest_unlinked;
+
+// Some simple test custom options of various types.
+
+extend google.protobuf.FileOptions {
+  uint64 file_opt1 = 7736975;
+}
+
+extend google.protobuf.MessageOptions {
+  int32 message_opt1 = 7739037;
+}
+
+extend google.protobuf.FieldOptions {
+  fixed64 field_opt1 = 7740937;
+}

+ 3 - 3
Protos/upstream/google/protobuf/unittest_delimited.proto

@@ -1,12 +1,12 @@
-edition = "2023";
+edition = "2024";
 
 package editions_unittest;
 
 import "google/protobuf/unittest_delimited_import.proto";
 
-option java_multiple_files = true;
+option java_outer_classname = "UnittestDelimited";
 
-// Test various scenarios that are now possible in edition 2023 that weren't in
+// Test various scenarios that are now possible in edition 2023+ that weren't in
 // google.protobuf.
 
 message LengthPrefixed {

+ 1 - 3
Protos/upstream/google/protobuf/unittest_delimited_import.proto

@@ -1,9 +1,7 @@
-edition = "2023";
+edition = "2024";
 
 package editions_unittest;
 
-option java_multiple_files = true;
-
 message MessageImport {
   int32 a = 1;
   int32 b = 2;

+ 1 - 1
Protos/upstream/google/protobuf/unittest_drop_unknown_fields.proto

@@ -5,7 +5,7 @@
 // license that can be found in the LICENSE file or at
 // https://developers.google.com/open-source/licenses/bsd
 
-edition = "2023";
+edition = "2024";
 
 package unittest_drop_unknown_fields;
 

+ 3 - 1
Protos/upstream/google/protobuf/unittest_features.proto

@@ -5,12 +5,14 @@
 // license that can be found in the LICENSE file or at
 // https://developers.google.com/open-source/licenses/bsd
 
-edition = "2023";
+edition = "2024";
 
 package pb;
 
 import "google/protobuf/descriptor.proto";
 
+option java_outer_classname = "UnittestFeatures";
+
 extend google.protobuf.FeatureSet {
   TestFeatures test = 9999;
 }

+ 31 - 0
Protos/upstream/google/protobuf/unittest_import_option.proto

@@ -0,0 +1,31 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+// Author: kenton@google.com (Kenton Varda)
+//  Based on original Protocol Buffers design by
+//  Sanjay Ghemawat, Jeff Dean, and others.
+//
+// A proto file to test options importing.
+edition = "2024";
+
+package proto2_unittest_import_option;
+
+// Test option import
+import option "google/protobuf/unittest_custom_options.proto";
+import option "google/protobuf/unittest_custom_options_unlinked.proto";
+
+option (proto2_unittest.file_opt1) = 1;
+option (proto2_unittest_unlinked.file_opt1) = 1;
+
+message TestMessage {
+  option (proto2_unittest.message_opt1) = 2;
+  option (proto2_unittest_unlinked.message_opt1) = 2;
+
+  int32 field1 = 1 [
+    (proto2_unittest.field_opt1) = 3,
+    (proto2_unittest_unlinked.field_opt1) = 3
+  ];
+}

+ 1 - 1
Protos/upstream/google/protobuf/unittest_lazy_dependencies.proto

@@ -11,7 +11,7 @@
 //
 // A proto file we will use for unit testing.
 
-edition = "2023";
+edition = "2024";
 
 import "google/protobuf/unittest_lazy_dependencies_custom_option.proto";
 

+ 1 - 1
Protos/upstream/google/protobuf/unittest_lazy_dependencies_custom_option.proto

@@ -11,7 +11,7 @@
 //
 // A proto file we will use for unit testing.
 
-edition = "2023";
+edition = "2024";
 
 import "google/protobuf/descriptor.proto";
 import "google/protobuf/unittest_lazy_dependencies_enum.proto";

+ 3 - 1
Protos/upstream/google/protobuf/unittest_lazy_dependencies_enum.proto

@@ -11,7 +11,7 @@
 //
 // A proto file we will use for unit testing.
 
-edition = "2023";
+edition = "2024";
 
 // Treat all enums as closed by default (proto2 behavior).
 option features.enum_type = CLOSED;
@@ -36,6 +36,8 @@ option optimize_for = SPEED;
 option java_outer_classname = "UnittestLazyImportsEnumProto";
 
 enum LazyEnum {
+  option features.enforce_naming_style = STYLE_LEGACY;
+
   LAZY_ENUM_0 = 0;
   LAZY_ENUM_1 = 1;
 }

+ 10 - 0
Protos/upstream/google/protobuf/unittest_lite_edition_2024.proto

@@ -0,0 +1,10 @@
+edition = "2024";
+
+package proto2_unittest;
+
+option optimize_for = LITE_RUNTIME;
+
+enum EnumNameStringView {
+  ENUM_NAME_STRING_VIEW_DEFAULT = 0;
+  ENUM_NAME_STRING_VIEW_ANOTHER_VALUE = 1;
+}

+ 11 - 9
Protos/upstream/google/protobuf/unittest_no_field_presence.proto

@@ -7,7 +7,11 @@
 
 // A proto file used to test a message type with no explicit field presence.
 
-edition = "2023";
+edition = "2024";
+
+import "google/protobuf/unittest.proto";
+
+import option "google/protobuf/cpp_features.proto";
 
 // Treat all fields as implicit present by default (proto3 behavior).
 option features.field_presence = IMPLICIT;
@@ -15,8 +19,6 @@ option features.field_presence = IMPLICIT;
 // We want to test embedded proto2 messages, so include some proto2 types.
 package proto2_nofieldpresence_unittest;
 
-import "google/protobuf/unittest.proto";
-
 // This proto includes every type of field in both singular and repeated
 // forms.
 message TestAllTypes {
@@ -46,8 +48,8 @@ message TestAllTypes {
   float optional_float = 11;
   double optional_double = 12;
   bool optional_bool = 13;
-  string optional_string = 14;
-  bytes optional_bytes = 15;
+  string optional_string = 14 [features.(pb.cpp).string_type = STRING];
+  bytes optional_bytes = 15 [features.(pb.cpp).string_type = STRING];
 
   NestedMessage optional_nested_message = 18;
   ForeignMessage optional_foreign_message = 19;
@@ -60,8 +62,8 @@ message TestAllTypes {
   // optional proto2_unittest.ForeignEnum          optional_proto2_enum     =
   // 23;
 
-  string optional_string_piece = 24 [ctype = STRING_PIECE];
-  string optional_cord = 25 [ctype = CORD];
+  string optional_string_piece = 24;
+  string optional_cord = 25 [features.(pb.cpp).string_type = CORD];
 
   NestedMessage optional_lazy_message = 30 [lazy = true];
 
@@ -89,8 +91,8 @@ message TestAllTypes {
   repeated NestedEnum repeated_nested_enum = 51;
   repeated ForeignEnum repeated_foreign_enum = 52;
 
-  repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
-  repeated string repeated_cord = 55 [ctype = CORD];
+  repeated string repeated_string_piece = 54;
+  repeated string repeated_cord = 55 [features.(pb.cpp).string_type = CORD];
 
   repeated NestedMessage repeated_lazy_message = 57;
 

+ 5 - 1
Protos/upstream/google/protobuf/unittest_preserve_unknown_enum.proto

@@ -5,7 +5,7 @@
 // license that can be found in the LICENSE file or at
 // https://developers.google.com/open-source/licenses/bsd
 
-edition = "2023";
+edition = "2024";
 
 package proto3_preserve_unknown_enum_unittest;
 
@@ -33,6 +33,8 @@ message MyMessage {
   repeated MyEnum repeated_packed_e = 3;
   repeated MyEnumPlusExtra repeated_packed_unexpected_e = 4;  // not packed
   oneof o {
+    option features.enforce_naming_style = STYLE_LEGACY;
+
     MyEnum oneof_e_1 = 5;
     MyEnum oneof_e_2 = 6;
   }
@@ -44,6 +46,8 @@ message MyMessagePlusExtra {
   repeated MyEnumPlusExtra repeated_packed_e = 3;
   repeated MyEnumPlusExtra repeated_packed_unexpected_e = 4;
   oneof o {
+    option features.enforce_naming_style = STYLE_LEGACY;
+
     MyEnumPlusExtra oneof_e_1 = 5;
     MyEnumPlusExtra oneof_e_2 = 6;
   }

+ 3 - 1
Protos/upstream/google/protobuf/unittest_preserve_unknown_enum2.proto

@@ -5,7 +5,7 @@
 // license that can be found in the LICENSE file or at
 // https://developers.google.com/open-source/licenses/bsd
 
-edition = "2023";
+edition = "2024";
 
 package proto2_preserve_unknown_enum_unittest;
 
@@ -27,6 +27,8 @@ message MyMessage {
       [features.repeated_field_encoding = PACKED];
   repeated MyEnum repeated_packed_unexpected_e = 4;  // not packed
   oneof o {
+    option features.enforce_naming_style = STYLE_LEGACY;
+
     MyEnum oneof_e_1 = 5;
     MyEnum oneof_e_2 = 6;
   }

+ 1 - 1
Protos/upstream/google/protobuf/unittest_redaction.proto

@@ -1,5 +1,5 @@
 // Test proto for redaction
-edition = "2023";
+edition = "2024";
 
 package proto2_unittest;
 

+ 2 - 2
Protos/upstream/google/protobuf/unittest_string_type.proto

@@ -5,11 +5,11 @@
 // license that can be found in the LICENSE file or at
 // https://developers.google.com/open-source/licenses/bsd
 
-edition = "2023";
+edition = "2024";
 
 package proto2_unittest;
 
-import "google/protobuf/cpp_features.proto";
+import option "google/protobuf/cpp_features.proto";
 
 message EntryProto {
   bytes value = 3 [features.(pb.cpp).string_type = CORD];

+ 1 - 5
Protos/upstream/google/protobuf/unittest_string_view.proto

@@ -1,12 +1,8 @@
-edition = "2023";
+edition = "2024";
 
 package proto2_unittest;
 
-import "google/protobuf/cpp_features.proto";
-
-option java_multiple_files = true;
 option optimize_for = SPEED;
-option features.(pb.cpp).string_type = VIEW;
 
 // NEXT_TAG = 6;
 message TestStringView {

+ 20 - 0
Reference/Sources/SwiftProtobuf/google/protobuf/api.pb.swift

@@ -59,6 +59,11 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: ProtobufAPIVersionCheck
 /// sometimes simply referred to as "APIs" in other contexts, such as the name of
 /// this message itself. See https://cloud.google.com/apis/design/glossary for
 /// detailed terminology.
+///
+/// New usages of this message as an alternative to ServiceDescriptorProto are
+/// strongly discouraged. This message does not reliability preserve all
+/// information necessary to model the schema and preserve semantics. Instead
+/// make use of FileDescriptorSet which preserves the necessary information.
 struct Google_Protobuf_Api: Sendable {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -123,6 +128,11 @@ struct Google_Protobuf_Api: Sendable {
 }
 
 /// Method represents a method of an API interface.
+///
+/// New usages of this message as an alternative to MethodDescriptorProto are
+/// strongly discouraged. This message does not reliability preserve all
+/// information necessary to model the schema and preserve semantics. Instead
+/// make use of FileDescriptorSet which preserves the necessary information.
 struct Google_Protobuf_Method: Sendable {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -147,9 +157,19 @@ struct Google_Protobuf_Method: Sendable {
   var options: [Google_Protobuf_Option] = []
 
   /// The source syntax of this method.
+  ///
+  /// This field should be ignored, instead the syntax should be inherited from
+  /// Api. This is similar to Field and EnumValue.
+  ///
+  /// NOTE: This field was marked as deprecated in the .proto file.
   var syntax: Google_Protobuf_Syntax = .proto2
 
   /// The source edition string, only valid when syntax is SYNTAX_EDITIONS.
+  ///
+  /// This field should be ignored, instead the edition should be inherited from
+  /// Api. This is similar to Field and EnumValue.
+  ///
+  /// NOTE: This field was marked as deprecated in the .proto file.
   var edition: String = String()
 
   var unknownFields = UnknownStorage()

+ 1 - 1
Reference/Sources/SwiftProtobuf/google/protobuf/descriptor.pb.swift

@@ -3697,7 +3697,7 @@ extension Google_Protobuf_EnumValueDescriptorProto: Message, _MessageImplementat
 
 extension Google_Protobuf_ServiceDescriptorProto: Message, _MessageImplementationBase, _ProtoNameProviding {
   static let protoMessageName: String = _protobuf_package + ".ServiceDescriptorProto"
-  static let _protobuf_nameMap = _NameMap(bytecode: "\0\u{1}name\0\u{1}method\0\u{1}options\0")
+  static let _protobuf_nameMap = _NameMap(bytecode: "\0\u{1}name\0\u{1}method\0\u{1}options\0\u{b}stream\0\u{c}\u{4}\u{1}")
 
   public var isInitialized: Bool {
     if !Internal.areAllInitialized(self.method) {return false}

+ 24 - 0
Reference/Sources/SwiftProtobuf/google/protobuf/type.pb.swift

@@ -96,6 +96,11 @@ enum Google_Protobuf_Syntax: Enum, Swift.CaseIterable {
 }
 
 /// A protocol buffer message type.
+///
+/// New usages of this message as an alternative to DescriptorProto are strongly
+/// discouraged. This message does not reliability preserve all information
+/// necessary to model the schema and preserve semantics. Instead make use of
+/// FileDescriptorSet which preserves the necessary information.
 struct Google_Protobuf_Type: Sendable {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -137,6 +142,11 @@ struct Google_Protobuf_Type: Sendable {
 }
 
 /// A single field of a message type.
+///
+/// New usages of this message as an alternative to FieldDescriptorProto are
+/// strongly discouraged. This message does not reliability preserve all
+/// information necessary to model the schema and preserve semantics. Instead
+/// make use of FileDescriptorSet which preserves the necessary information.
 struct Google_Protobuf_Field: Sendable {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -372,6 +382,11 @@ struct Google_Protobuf_Field: Sendable {
 }
 
 /// Enum type definition.
+///
+/// New usages of this message as an alternative to EnumDescriptorProto are
+/// strongly discouraged. This message does not reliability preserve all
+/// information necessary to model the schema and preserve semantics. Instead
+/// make use of FileDescriptorSet which preserves the necessary information.
 struct Google_Protobuf_Enum: Sendable {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -410,6 +425,11 @@ struct Google_Protobuf_Enum: Sendable {
 }
 
 /// Enum value definition.
+///
+/// New usages of this message as an alternative to EnumValueDescriptorProto are
+/// strongly discouraged. This message does not reliability preserve all
+/// information necessary to model the schema and preserve semantics. Instead
+/// make use of FileDescriptorSet which preserves the necessary information.
 struct Google_Protobuf_EnumValue: Sendable {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -431,6 +451,10 @@ struct Google_Protobuf_EnumValue: Sendable {
 
 /// A protocol buffer option, which can be attached to a message, field,
 /// enumeration, etc.
+///
+/// New usages of this message as an alternative to FileOptions, MessageOptions,
+/// FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions
+/// are strongly discouraged.
 struct Google_Protobuf_Option: Sendable {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for

+ 20 - 0
Reference/upstream/google/protobuf/api.pb.swift

@@ -59,6 +59,11 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: ProtobufAPIVersionCheck
 /// sometimes simply referred to as "APIs" in other contexts, such as the name of
 /// this message itself. See https://cloud.google.com/apis/design/glossary for
 /// detailed terminology.
+///
+/// New usages of this message as an alternative to ServiceDescriptorProto are
+/// strongly discouraged. This message does not reliability preserve all
+/// information necessary to model the schema and preserve semantics. Instead
+/// make use of FileDescriptorSet which preserves the necessary information.
 struct Google_Protobuf_Api: Sendable {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -123,6 +128,11 @@ struct Google_Protobuf_Api: Sendable {
 }
 
 /// Method represents a method of an API interface.
+///
+/// New usages of this message as an alternative to MethodDescriptorProto are
+/// strongly discouraged. This message does not reliability preserve all
+/// information necessary to model the schema and preserve semantics. Instead
+/// make use of FileDescriptorSet which preserves the necessary information.
 struct Google_Protobuf_Method: Sendable {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -147,9 +157,19 @@ struct Google_Protobuf_Method: Sendable {
   var options: [Google_Protobuf_Option] = []
 
   /// The source syntax of this method.
+  ///
+  /// This field should be ignored, instead the syntax should be inherited from
+  /// Api. This is similar to Field and EnumValue.
+  ///
+  /// NOTE: This field was marked as deprecated in the .proto file.
   var syntax: Google_Protobuf_Syntax = .proto2
 
   /// The source edition string, only valid when syntax is SYNTAX_EDITIONS.
+  ///
+  /// This field should be ignored, instead the edition should be inherited from
+  /// Api. This is similar to Field and EnumValue.
+  ///
+  /// NOTE: This field was marked as deprecated in the .proto file.
   var edition: String = String()
 
   var unknownFields = UnknownStorage()

+ 1 - 1
Reference/upstream/google/protobuf/descriptor.pb.swift

@@ -3697,7 +3697,7 @@ extension Google_Protobuf_EnumValueDescriptorProto: Message, _MessageImplementat
 
 extension Google_Protobuf_ServiceDescriptorProto: Message, _MessageImplementationBase, _ProtoNameProviding {
   static let protoMessageName: String = _protobuf_package + ".ServiceDescriptorProto"
-  static let _protobuf_nameMap = _NameMap(bytecode: "\0\u{1}name\0\u{1}method\0\u{1}options\0")
+  static let _protobuf_nameMap = _NameMap(bytecode: "\0\u{1}name\0\u{1}method\0\u{1}options\0\u{b}stream\0\u{c}\u{4}\u{1}")
 
   public var isInitialized: Bool {
     if !Internal.areAllInitialized(self.method) {return false}

+ 24 - 0
Reference/upstream/google/protobuf/type.pb.swift

@@ -96,6 +96,11 @@ enum Google_Protobuf_Syntax: Enum, Swift.CaseIterable {
 }
 
 /// A protocol buffer message type.
+///
+/// New usages of this message as an alternative to DescriptorProto are strongly
+/// discouraged. This message does not reliability preserve all information
+/// necessary to model the schema and preserve semantics. Instead make use of
+/// FileDescriptorSet which preserves the necessary information.
 struct Google_Protobuf_Type: Sendable {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -137,6 +142,11 @@ struct Google_Protobuf_Type: Sendable {
 }
 
 /// A single field of a message type.
+///
+/// New usages of this message as an alternative to FieldDescriptorProto are
+/// strongly discouraged. This message does not reliability preserve all
+/// information necessary to model the schema and preserve semantics. Instead
+/// make use of FileDescriptorSet which preserves the necessary information.
 struct Google_Protobuf_Field: Sendable {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -372,6 +382,11 @@ struct Google_Protobuf_Field: Sendable {
 }
 
 /// Enum type definition.
+///
+/// New usages of this message as an alternative to EnumDescriptorProto are
+/// strongly discouraged. This message does not reliability preserve all
+/// information necessary to model the schema and preserve semantics. Instead
+/// make use of FileDescriptorSet which preserves the necessary information.
 struct Google_Protobuf_Enum: Sendable {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -410,6 +425,11 @@ struct Google_Protobuf_Enum: Sendable {
 }
 
 /// Enum value definition.
+///
+/// New usages of this message as an alternative to EnumValueDescriptorProto are
+/// strongly discouraged. This message does not reliability preserve all
+/// information necessary to model the schema and preserve semantics. Instead
+/// make use of FileDescriptorSet which preserves the necessary information.
 struct Google_Protobuf_EnumValue: Sendable {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -431,6 +451,10 @@ struct Google_Protobuf_EnumValue: Sendable {
 
 /// A protocol buffer option, which can be attached to a message, field,
 /// enumeration, etc.
+///
+/// New usages of this message as an alternative to FileOptions, MessageOptions,
+/// FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions
+/// are strongly discouraged.
 struct Google_Protobuf_Option: Sendable {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for

+ 129 - 0
Reference/upstream/google/protobuf/unittest_custom_options_unlinked.pb.swift

@@ -0,0 +1,129 @@
+// DO NOT EDIT.
+// swift-format-ignore-file
+// swiftlint:disable all
+//
+// Generated by the Swift generator plugin for the protocol buffer compiler.
+// Source: google/protobuf/unittest_custom_options_unlinked.proto
+//
+// For information on using the generated types, please see the documentation:
+//   https://github.com/apple/swift-protobuf/
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+
+// Author: benjy@google.com (Benjy Weinberger)
+//  Based on original Protocol Buffers design by
+//  Sanjay Ghemawat, Jeff Dean, and others.
+//
+// A proto file used to test the "custom options" feature when not linked in.
+
+import SwiftProtobuf
+
+// If the compiler emits an error on this type, it is because this file
+// was generated by a version of the `protoc` Swift plug-in that is
+// incompatible with the version of SwiftProtobuf to which you are linking.
+// Please ensure that you are building against the same version of the API
+// that was used to generate this file.
+fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
+  struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
+  typealias Version = _2
+}
+
+// MARK: - Extension support defined in unittest_custom_options_unlinked.proto.
+
+// MARK: - Extension Properties
+
+// Swift Extensions on the extended Messages to add easy access to the declared
+// extension fields. The names are based on the extension field name from the proto
+// declaration. To avoid naming collisions, the names are prefixed with the name of
+// the scope where the extend directive occurs.
+
+extension SwiftProtobuf.Google_Protobuf_FieldOptions {
+
+  var Proto2UnittestUnlinked_fieldOpt1: UInt64 {
+    get {return getExtensionValue(ext: Proto2UnittestUnlinked_Extensions_field_opt1) ?? 0}
+    set {setExtensionValue(ext: Proto2UnittestUnlinked_Extensions_field_opt1, value: newValue)}
+  }
+  /// Returns true if extension `Proto2UnittestUnlinked_Extensions_field_opt1`
+  /// has been explicitly set.
+  var hasProto2UnittestUnlinked_fieldOpt1: Bool {
+    return hasExtensionValue(ext: Proto2UnittestUnlinked_Extensions_field_opt1)
+  }
+  /// Clears the value of extension `Proto2UnittestUnlinked_Extensions_field_opt1`.
+  /// Subsequent reads from it will return its default value.
+  mutating func clearProto2UnittestUnlinked_fieldOpt1() {
+    clearExtensionValue(ext: Proto2UnittestUnlinked_Extensions_field_opt1)
+  }
+}
+
+extension SwiftProtobuf.Google_Protobuf_FileOptions {
+
+  var Proto2UnittestUnlinked_fileOpt1: UInt64 {
+    get {return getExtensionValue(ext: Proto2UnittestUnlinked_Extensions_file_opt1) ?? 0}
+    set {setExtensionValue(ext: Proto2UnittestUnlinked_Extensions_file_opt1, value: newValue)}
+  }
+  /// Returns true if extension `Proto2UnittestUnlinked_Extensions_file_opt1`
+  /// has been explicitly set.
+  var hasProto2UnittestUnlinked_fileOpt1: Bool {
+    return hasExtensionValue(ext: Proto2UnittestUnlinked_Extensions_file_opt1)
+  }
+  /// Clears the value of extension `Proto2UnittestUnlinked_Extensions_file_opt1`.
+  /// Subsequent reads from it will return its default value.
+  mutating func clearProto2UnittestUnlinked_fileOpt1() {
+    clearExtensionValue(ext: Proto2UnittestUnlinked_Extensions_file_opt1)
+  }
+}
+
+extension SwiftProtobuf.Google_Protobuf_MessageOptions {
+
+  var Proto2UnittestUnlinked_messageOpt1: Int32 {
+    get {return getExtensionValue(ext: Proto2UnittestUnlinked_Extensions_message_opt1) ?? 0}
+    set {setExtensionValue(ext: Proto2UnittestUnlinked_Extensions_message_opt1, value: newValue)}
+  }
+  /// Returns true if extension `Proto2UnittestUnlinked_Extensions_message_opt1`
+  /// has been explicitly set.
+  var hasProto2UnittestUnlinked_messageOpt1: Bool {
+    return hasExtensionValue(ext: Proto2UnittestUnlinked_Extensions_message_opt1)
+  }
+  /// Clears the value of extension `Proto2UnittestUnlinked_Extensions_message_opt1`.
+  /// Subsequent reads from it will return its default value.
+  mutating func clearProto2UnittestUnlinked_messageOpt1() {
+    clearExtensionValue(ext: Proto2UnittestUnlinked_Extensions_message_opt1)
+  }
+
+}
+
+// MARK: - File's ExtensionMap: Proto2UnittestUnlinked_UnittestCustomOptionsUnlinked_Extensions
+
+/// A `SwiftProtobuf.SimpleExtensionMap` that includes all of the extensions defined by
+/// this .proto file. It can be used any place an `SwiftProtobuf.ExtensionMap` is needed
+/// in parsing, or it can be combined with other `SwiftProtobuf.SimpleExtensionMap`s to create
+/// a larger `SwiftProtobuf.SimpleExtensionMap`.
+let Proto2UnittestUnlinked_UnittestCustomOptionsUnlinked_Extensions: SwiftProtobuf.SimpleExtensionMap = [
+  Proto2UnittestUnlinked_Extensions_file_opt1,
+  Proto2UnittestUnlinked_Extensions_message_opt1,
+  Proto2UnittestUnlinked_Extensions_field_opt1
+]
+
+// Extension Objects - The only reason these might be needed is when manually
+// constructing a `SimpleExtensionMap`, otherwise, use the above _Extension Properties_
+// accessors for the extension fields on the messages directly.
+
+let Proto2UnittestUnlinked_Extensions_file_opt1 = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufUInt64>, SwiftProtobuf.Google_Protobuf_FileOptions>(
+  _protobuf_fieldNumber: 7736975,
+  fieldName: "proto2_unittest_unlinked.file_opt1"
+)
+
+let Proto2UnittestUnlinked_Extensions_message_opt1 = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufInt32>, SwiftProtobuf.Google_Protobuf_MessageOptions>(
+  _protobuf_fieldNumber: 7739037,
+  fieldName: "proto2_unittest_unlinked.message_opt1"
+)
+
+let Proto2UnittestUnlinked_Extensions_field_opt1 = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufFixed64>, SwiftProtobuf.Google_Protobuf_FieldOptions>(
+  _protobuf_fieldNumber: 7740937,
+  fieldName: "proto2_unittest_unlinked.field_opt1"
+)

+ 92 - 0
Reference/upstream/google/protobuf/unittest_import_option.pb.swift

@@ -0,0 +1,92 @@
+// DO NOT EDIT.
+// swift-format-ignore-file
+// swiftlint:disable all
+//
+// Generated by the Swift generator plugin for the protocol buffer compiler.
+// Source: google/protobuf/unittest_import_option.proto
+//
+// For information on using the generated types, please see the documentation:
+//   https://github.com/apple/swift-protobuf/
+
+/// Protocol Buffers - Google's data interchange format
+/// Copyright 2008 Google Inc.  All rights reserved.
+///
+/// Use of this source code is governed by a BSD-style
+/// license that can be found in the LICENSE file or at
+/// https://developers.google.com/open-source/licenses/bsd
+/// Author: kenton@google.com (Kenton Varda)
+///  Based on original Protocol Buffers design by
+///  Sanjay Ghemawat, Jeff Dean, and others.
+///
+/// A proto file to test options importing.
+
+import SwiftProtobuf
+
+// If the compiler emits an error on this type, it is because this file
+// was generated by a version of the `protoc` Swift plug-in that is
+// incompatible with the version of SwiftProtobuf to which you are linking.
+// Please ensure that you are building against the same version of the API
+// that was used to generate this file.
+fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
+  struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
+  typealias Version = _2
+}
+
+struct Proto2UnittestImportOption_TestMessage: Sendable {
+  // SwiftProtobuf.Message conformance is added in an extension below. See the
+  // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
+  // methods supported on all messages.
+
+  var field1: Int32 {
+    get {return _field1 ?? 0}
+    set {_field1 = newValue}
+  }
+  /// Returns true if `field1` has been explicitly set.
+  var hasField1: Bool {return self._field1 != nil}
+  /// Clears the value of `field1`. Subsequent reads from it will return its default value.
+  mutating func clearField1() {self._field1 = nil}
+
+  var unknownFields = SwiftProtobuf.UnknownStorage()
+
+  init() {}
+
+  fileprivate var _field1: Int32? = nil
+}
+
+// MARK: - Code below here is support for the SwiftProtobuf runtime.
+
+fileprivate let _protobuf_package = "proto2_unittest_import_option"
+
+extension Proto2UnittestImportOption_TestMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
+  static let protoMessageName: String = _protobuf_package + ".TestMessage"
+  static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}field1\0")
+
+  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
+    while let fieldNumber = try decoder.nextFieldNumber() {
+      // The use of inline closures is to circumvent an issue where the compiler
+      // allocates stack space for every case branch when no optimizations are
+      // enabled. https://github.com/apple/swift-protobuf/issues/1034
+      switch fieldNumber {
+      case 1: try { try decoder.decodeSingularInt32Field(value: &self._field1) }()
+      default: break
+      }
+    }
+  }
+
+  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
+    // The use of inline closures is to circumvent an issue where the compiler
+    // allocates stack space for every if/case branch local when no optimizations
+    // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
+    // https://github.com/apple/swift-protobuf/issues/1182
+    try { if let v = self._field1 {
+      try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
+    } }()
+    try unknownFields.traverse(visitor: &visitor)
+  }
+
+  static func ==(lhs: Proto2UnittestImportOption_TestMessage, rhs: Proto2UnittestImportOption_TestMessage) -> Bool {
+    if lhs._field1 != rhs._field1 {return false}
+    if lhs.unknownFields != rhs.unknownFields {return false}
+    return true
+  }
+}

+ 61 - 0
Reference/upstream/google/protobuf/unittest_lite_edition_2024.pb.swift

@@ -0,0 +1,61 @@
+// DO NOT EDIT.
+// swift-format-ignore-file
+// swiftlint:disable all
+//
+// Generated by the Swift generator plugin for the protocol buffer compiler.
+// Source: google/protobuf/unittest_lite_edition_2024.proto
+//
+// For information on using the generated types, please see the documentation:
+//   https://github.com/apple/swift-protobuf/
+
+import SwiftProtobuf
+
+// If the compiler emits an error on this type, it is because this file
+// was generated by a version of the `protoc` Swift plug-in that is
+// incompatible with the version of SwiftProtobuf to which you are linking.
+// Please ensure that you are building against the same version of the API
+// that was used to generate this file.
+fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
+  struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
+  typealias Version = _2
+}
+
+enum Proto2Unittest_EnumNameStringView: SwiftProtobuf.Enum, Swift.CaseIterable {
+  typealias RawValue = Int
+  case `default` // = 0
+  case anotherValue // = 1
+  case UNRECOGNIZED(Int)
+
+  init() {
+    self = .default
+  }
+
+  init?(rawValue: Int) {
+    switch rawValue {
+    case 0: self = .default
+    case 1: self = .anotherValue
+    default: self = .UNRECOGNIZED(rawValue)
+    }
+  }
+
+  var rawValue: Int {
+    switch self {
+    case .default: return 0
+    case .anotherValue: return 1
+    case .UNRECOGNIZED(let i): return i
+    }
+  }
+
+  // The compiler won't synthesize support with the UNRECOGNIZED case.
+  static let allCases: [Proto2Unittest_EnumNameStringView] = [
+    .default,
+    .anotherValue,
+  ]
+
+}
+
+// MARK: - Code below here is support for the SwiftProtobuf runtime.
+
+extension Proto2Unittest_EnumNameStringView: SwiftProtobuf._ProtoNameProviding {
+  static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0ENUM_NAME_STRING_VIEW_DEFAULT\0\u{1}ENUM_NAME_STRING_VIEW_ANOTHER_VALUE\0")
+}

+ 20 - 0
Sources/SwiftProtobuf/api.pb.swift

@@ -59,6 +59,11 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: ProtobufAPIVersionCheck
 /// sometimes simply referred to as "APIs" in other contexts, such as the name of
 /// this message itself. See https://cloud.google.com/apis/design/glossary for
 /// detailed terminology.
+///
+/// New usages of this message as an alternative to ServiceDescriptorProto are
+/// strongly discouraged. This message does not reliability preserve all
+/// information necessary to model the schema and preserve semantics. Instead
+/// make use of FileDescriptorSet which preserves the necessary information.
 public struct Google_Protobuf_Api: Sendable {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -123,6 +128,11 @@ public struct Google_Protobuf_Api: Sendable {
 }
 
 /// Method represents a method of an API interface.
+///
+/// New usages of this message as an alternative to MethodDescriptorProto are
+/// strongly discouraged. This message does not reliability preserve all
+/// information necessary to model the schema and preserve semantics. Instead
+/// make use of FileDescriptorSet which preserves the necessary information.
 public struct Google_Protobuf_Method: Sendable {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -147,9 +157,19 @@ public struct Google_Protobuf_Method: Sendable {
   public var options: [Google_Protobuf_Option] = []
 
   /// The source syntax of this method.
+  ///
+  /// This field should be ignored, instead the syntax should be inherited from
+  /// Api. This is similar to Field and EnumValue.
+  ///
+  /// NOTE: This field was marked as deprecated in the .proto file.
   public var syntax: Google_Protobuf_Syntax = .proto2
 
   /// The source edition string, only valid when syntax is SYNTAX_EDITIONS.
+  ///
+  /// This field should be ignored, instead the edition should be inherited from
+  /// Api. This is similar to Field and EnumValue.
+  ///
+  /// NOTE: This field was marked as deprecated in the .proto file.
   public var edition: String = String()
 
   public var unknownFields = UnknownStorage()

+ 1 - 1
Sources/SwiftProtobuf/descriptor.pb.swift

@@ -3697,7 +3697,7 @@ extension Google_Protobuf_EnumValueDescriptorProto: Message, _MessageImplementat
 
 extension Google_Protobuf_ServiceDescriptorProto: Message, _MessageImplementationBase, _ProtoNameProviding {
   public static let protoMessageName: String = _protobuf_package + ".ServiceDescriptorProto"
-  public static let _protobuf_nameMap = _NameMap(bytecode: "\0\u{1}name\0\u{1}method\0\u{1}options\0")
+  public static let _protobuf_nameMap = _NameMap(bytecode: "\0\u{1}name\0\u{1}method\0\u{1}options\0\u{b}stream\0\u{c}\u{4}\u{1}")
 
   public var isInitialized: Bool {
     if !Internal.areAllInitialized(self.method) {return false}

+ 24 - 0
Sources/SwiftProtobuf/type.pb.swift

@@ -96,6 +96,11 @@ public enum Google_Protobuf_Syntax: Enum, Swift.CaseIterable {
 }
 
 /// A protocol buffer message type.
+///
+/// New usages of this message as an alternative to DescriptorProto are strongly
+/// discouraged. This message does not reliability preserve all information
+/// necessary to model the schema and preserve semantics. Instead make use of
+/// FileDescriptorSet which preserves the necessary information.
 public struct Google_Protobuf_Type: Sendable {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -137,6 +142,11 @@ public struct Google_Protobuf_Type: Sendable {
 }
 
 /// A single field of a message type.
+///
+/// New usages of this message as an alternative to FieldDescriptorProto are
+/// strongly discouraged. This message does not reliability preserve all
+/// information necessary to model the schema and preserve semantics. Instead
+/// make use of FileDescriptorSet which preserves the necessary information.
 public struct Google_Protobuf_Field: Sendable {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -372,6 +382,11 @@ public struct Google_Protobuf_Field: Sendable {
 }
 
 /// Enum type definition.
+///
+/// New usages of this message as an alternative to EnumDescriptorProto are
+/// strongly discouraged. This message does not reliability preserve all
+/// information necessary to model the schema and preserve semantics. Instead
+/// make use of FileDescriptorSet which preserves the necessary information.
 public struct Google_Protobuf_Enum: Sendable {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -410,6 +425,11 @@ public struct Google_Protobuf_Enum: Sendable {
 }
 
 /// Enum value definition.
+///
+/// New usages of this message as an alternative to EnumValueDescriptorProto are
+/// strongly discouraged. This message does not reliability preserve all
+/// information necessary to model the schema and preserve semantics. Instead
+/// make use of FileDescriptorSet which preserves the necessary information.
 public struct Google_Protobuf_EnumValue: Sendable {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -431,6 +451,10 @@ public struct Google_Protobuf_EnumValue: Sendable {
 
 /// A protocol buffer option, which can be attached to a message, field,
 /// enumeration, etc.
+///
+/// New usages of this message as an alternative to FileOptions, MessageOptions,
+/// FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions
+/// are strongly discouraged.
 public struct Google_Protobuf_Option: Sendable {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for