grpc-tools 1.58.0 → 1.59.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8c9d88cbd50c6c1899f4c0fdf4a95e2012b1a352f6eaec5fc9ca9b70f6ab7f3
4
- data.tar.gz: b8e32870364885b180b12b07ed93ab89e94003c34472226f1dc4c88f0c036e90
3
+ metadata.gz: 52568083b1debb497f88c8270fd26b5acee3f2f0e981442c3fb77437ffdab9ca
4
+ data.tar.gz: 19e92a9a455cd3cc9dc45928d663ed4430bad5fe5388baa529da9bebd9d5413b
5
5
  SHA512:
6
- metadata.gz: 457f5c94299a387894fa3d92b850d829acdc881642b2ba65a4341ffdc953913a593d11349b7c4ed7d5e4cb273158f2ce568169049e528337dec655177e155ffe
7
- data.tar.gz: 6a561b644b0712db05109d3b2d6d2a18687f6337988bdc0cec3105e1297f9938e26c70847b27a91fd00ea6c6ca6d571da2e5b35016c5acffb4945aadc011ad72
6
+ metadata.gz: 72a67b95e1db0d571c681b990dd3ed1d19daa28d26fadd809238788e3af99beb7ab92e6afced288d46d9122a7c24385be7a56dc4604cfa4e8456067dd5afaef5
7
+ data.tar.gz: 90721875677d2396723a1abd9e7fe04b8ba5e2ad1e049e12691fc00f97c2e245e98ae3c01acfdbc1fda97864d6c3ada889208be48eb84f4680af02af702dd9d9
@@ -149,7 +149,8 @@ message Any {
149
149
  //
150
150
  // Note: this functionality is not currently available in the official
151
151
  // protobuf release, and it is not used for type URLs beginning with
152
- // type.googleapis.com.
152
+ // type.googleapis.com. As of May 2023, there are no widely used type server
153
+ // implementations and no plans to implement one.
153
154
  //
154
155
  // Schemes other than `http`, `https` (or the empty scheme) might be
155
156
  // used with implementation specific semantics.
@@ -76,6 +76,11 @@ message CodeGeneratorRequest {
76
76
  // they import. The files will appear in topological order, so each file
77
77
  // appears before any file that imports it.
78
78
  //
79
+ // Note: the files listed in files_to_generate will include runtime-retention
80
+ // options only, but all other files will include source-retention options.
81
+ // The source_file_descriptors field below is available in case you need
82
+ // source-retention options for files_to_generate.
83
+ //
79
84
  // protoc guarantees that all proto_files will be written after
80
85
  // the fields above, even though this is not technically guaranteed by the
81
86
  // protobuf wire format. This theoretically could allow a plugin to stream
@@ -88,6 +93,11 @@ message CodeGeneratorRequest {
88
93
  // fully qualified.
89
94
  repeated FileDescriptorProto proto_file = 15;
90
95
 
96
+ // File descriptors with all options, including source-retention options.
97
+ // These descriptors are only provided for the files listed in
98
+ // files_to_generate.
99
+ repeated FileDescriptorProto source_file_descriptors = 17;
100
+
91
101
  // The version number of protocol compiler.
92
102
  optional Version compiler_version = 3;
93
103
  }
@@ -112,6 +122,7 @@ message CodeGeneratorResponse {
112
122
  enum Feature {
113
123
  FEATURE_NONE = 0;
114
124
  FEATURE_PROTO3_OPTIONAL = 1;
125
+ FEATURE_SUPPORTS_EDITIONS = 2;
115
126
  }
116
127
 
117
128
  // Represents a single generated file.
@@ -146,9 +146,6 @@ message ExtensionRangeOptions {
146
146
  // and enums.
147
147
  optional string type = 3;
148
148
 
149
- // Deprecated. Please use "repeated".
150
- optional bool is_repeated = 4 [deprecated = true];
151
-
152
149
  // If true, indicates that the number is reserved in the extension range,
153
150
  // and any extension field with the number will fail to compile. Set this
154
151
  // when a declared extension field is deleted.
@@ -157,14 +154,18 @@ message ExtensionRangeOptions {
157
154
  // If true, indicates that the extension must be defined as repeated.
158
155
  // Otherwise the extension must be defined as optional.
159
156
  optional bool repeated = 6;
157
+
158
+ reserved 4; // removed is_repeated
160
159
  }
161
160
 
162
- // go/protobuf-stripping-extension-declarations
163
- // Like Metadata, but we use a repeated field to hold all extension
164
- // declarations. This should avoid the size increases of transforming a large
165
- // extension range into small ranges in generated binaries.
161
+ // For external users: DO NOT USE. We are in the process of open sourcing
162
+ // extension declaration and executing internal cleanups before it can be
163
+ // used externally.
166
164
  repeated Declaration declaration = 2 [retention = RETENTION_SOURCE];
167
165
 
166
+ // Any features defined in the specific edition.
167
+ optional FeatureSet features = 50;
168
+
168
169
  // The verification state of the extension range.
169
170
  enum VerificationState {
170
171
  // All the extensions of the range must be declared.
@@ -491,6 +492,9 @@ message FileOptions {
491
492
  // determining the ruby package.
492
493
  optional string ruby_package = 45;
493
494
 
495
+ // Any features defined in the specific edition.
496
+ optional FeatureSet features = 50;
497
+
494
498
  // The parser stores options it doesn't recognize here.
495
499
  // See the documentation for the "Options" section above.
496
500
  repeated UninterpretedOption uninterpreted_option = 999;
@@ -574,6 +578,9 @@ message MessageOptions {
574
578
  // teams have had time to migrate.
575
579
  optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];
576
580
 
581
+ // Any features defined in the specific edition.
582
+ optional FeatureSet features = 12;
583
+
577
584
  // The parser stores options it doesn't recognize here. See above.
578
585
  repeated UninterpretedOption uninterpreted_option = 999;
579
586
 
@@ -711,19 +718,31 @@ message FieldOptions {
711
718
  TARGET_TYPE_METHOD = 9;
712
719
  }
713
720
 
714
- optional OptionTargetType target = 18 [deprecated = true];
715
721
  repeated OptionTargetType targets = 19;
716
722
 
723
+ message EditionDefault {
724
+ optional string edition = 1;
725
+ optional string value = 2; // Textproto value.
726
+ }
727
+ repeated EditionDefault edition_defaults = 20;
728
+
729
+ // Any features defined in the specific edition.
730
+ optional FeatureSet features = 21;
731
+
717
732
  // The parser stores options it doesn't recognize here. See above.
718
733
  repeated UninterpretedOption uninterpreted_option = 999;
719
734
 
720
735
  // Clients can define custom options in extensions of this message. See above.
721
736
  extensions 1000 to max;
722
737
 
723
- reserved 4; // removed jtype
738
+ reserved 4; // removed jtype
739
+ reserved 18; // reserve target, target_obsolete_do_not_use
724
740
  }
725
741
 
726
742
  message OneofOptions {
743
+ // Any features defined in the specific edition.
744
+ optional FeatureSet features = 1;
745
+
727
746
  // The parser stores options it doesn't recognize here. See above.
728
747
  repeated UninterpretedOption uninterpreted_option = 999;
729
748
 
@@ -753,6 +772,9 @@ message EnumOptions {
753
772
  // had time to migrate.
754
773
  optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];
755
774
 
775
+ // Any features defined in the specific edition.
776
+ optional FeatureSet features = 7;
777
+
756
778
  // The parser stores options it doesn't recognize here. See above.
757
779
  repeated UninterpretedOption uninterpreted_option = 999;
758
780
 
@@ -767,6 +789,14 @@ message EnumValueOptions {
767
789
  // this is a formalization for deprecating enum values.
768
790
  optional bool deprecated = 1 [default = false];
769
791
 
792
+ // Any features defined in the specific edition.
793
+ optional FeatureSet features = 2;
794
+
795
+ // Indicate that fields annotated with this enum value should not be printed
796
+ // out when using debug formats, e.g. when the field contains sensitive
797
+ // credentials.
798
+ optional bool debug_redact = 3 [default = false];
799
+
770
800
  // The parser stores options it doesn't recognize here. See above.
771
801
  repeated UninterpretedOption uninterpreted_option = 999;
772
802
 
@@ -776,6 +806,9 @@ message EnumValueOptions {
776
806
 
777
807
  message ServiceOptions {
778
808
 
809
+ // Any features defined in the specific edition.
810
+ optional FeatureSet features = 34;
811
+
779
812
  // Note: Field numbers 1 through 32 are reserved for Google's internal RPC
780
813
  // framework. We apologize for hoarding these numbers to ourselves, but
781
814
  // we were already using them long before we decided to release Protocol
@@ -818,6 +851,9 @@ message MethodOptions {
818
851
  optional IdempotencyLevel idempotency_level = 34
819
852
  [default = IDEMPOTENCY_UNKNOWN];
820
853
 
854
+ // Any features defined in the specific edition.
855
+ optional FeatureSet features = 35;
856
+
821
857
  // The parser stores options it doesn't recognize here. See above.
822
858
  repeated UninterpretedOption uninterpreted_option = 999;
823
859
 
@@ -853,6 +889,99 @@ message UninterpretedOption {
853
889
  optional string aggregate_value = 8;
854
890
  }
855
891
 
892
+ // ===================================================================
893
+ // Features
894
+
895
+ // TODO(b/274655146) Enums in C++ gencode (and potentially other languages) are
896
+ // not well scoped. This means that each of the feature enums below can clash
897
+ // with each other. The short names we've chosen maximize call-site
898
+ // readability, but leave us very open to this scenario. A future feature will
899
+ // be designed and implemented to handle this, hopefully before we ever hit a
900
+ // conflict here.
901
+ message FeatureSet {
902
+ enum FieldPresence {
903
+ FIELD_PRESENCE_UNKNOWN = 0;
904
+ EXPLICIT = 1;
905
+ IMPLICIT = 2;
906
+ LEGACY_REQUIRED = 3;
907
+ }
908
+ optional FieldPresence field_presence = 1 [
909
+ retention = RETENTION_RUNTIME,
910
+ targets = TARGET_TYPE_FIELD,
911
+ targets = TARGET_TYPE_FILE,
912
+ edition_defaults = { edition: "2023", value: "EXPLICIT" }
913
+ ];
914
+
915
+ enum EnumType {
916
+ ENUM_TYPE_UNKNOWN = 0;
917
+ OPEN = 1;
918
+ CLOSED = 2;
919
+ }
920
+ optional EnumType enum_type = 2 [
921
+ retention = RETENTION_RUNTIME,
922
+ targets = TARGET_TYPE_ENUM,
923
+ targets = TARGET_TYPE_FILE,
924
+ edition_defaults = { edition: "2023", value: "OPEN" }
925
+ ];
926
+
927
+ enum RepeatedFieldEncoding {
928
+ REPEATED_FIELD_ENCODING_UNKNOWN = 0;
929
+ PACKED = 1;
930
+ EXPANDED = 2;
931
+ }
932
+ optional RepeatedFieldEncoding repeated_field_encoding = 3 [
933
+ retention = RETENTION_RUNTIME,
934
+ targets = TARGET_TYPE_FIELD,
935
+ targets = TARGET_TYPE_FILE,
936
+ edition_defaults = { edition: "2023", value: "PACKED" }
937
+ ];
938
+
939
+ enum StringFieldValidation {
940
+ STRING_FIELD_VALIDATION_UNKNOWN = 0;
941
+ MANDATORY = 1;
942
+ HINT = 2;
943
+ NONE = 3;
944
+ }
945
+ optional StringFieldValidation string_field_validation = 4 [
946
+ retention = RETENTION_RUNTIME,
947
+ targets = TARGET_TYPE_FIELD,
948
+ targets = TARGET_TYPE_FILE,
949
+ edition_defaults = { edition: "2023", value: "MANDATORY" }
950
+ ];
951
+
952
+ enum MessageEncoding {
953
+ MESSAGE_ENCODING_UNKNOWN = 0;
954
+ LENGTH_PREFIXED = 1;
955
+ DELIMITED = 2;
956
+ }
957
+ optional MessageEncoding message_encoding = 5 [
958
+ retention = RETENTION_RUNTIME,
959
+ targets = TARGET_TYPE_FIELD,
960
+ targets = TARGET_TYPE_FILE,
961
+ edition_defaults = { edition: "2023", value: "LENGTH_PREFIXED" }
962
+ ];
963
+
964
+ enum JsonFormat {
965
+ JSON_FORMAT_UNKNOWN = 0;
966
+ ALLOW = 1;
967
+ LEGACY_BEST_EFFORT = 2;
968
+ }
969
+ optional JsonFormat json_format = 6 [
970
+ retention = RETENTION_RUNTIME,
971
+ targets = TARGET_TYPE_MESSAGE,
972
+ targets = TARGET_TYPE_ENUM,
973
+ targets = TARGET_TYPE_FILE,
974
+ edition_defaults = { edition: "2023", value: "ALLOW" }
975
+ ];
976
+
977
+ optional FeatureSet raw_features = 999 [targets = TARGET_TYPE_UNKNOWN];
978
+
979
+ extensions 1000; // for Protobuf C++
980
+ extensions 1001; // for Protobuf Java
981
+
982
+ extensions 9995 to 9999; // For internal testing
983
+ }
984
+
856
985
  // ===================================================================
857
986
  // Optional source code info
858
987
 
Binary file
data/bin/x86-linux/protoc CHANGED
Binary file
@@ -149,7 +149,8 @@ message Any {
149
149
  //
150
150
  // Note: this functionality is not currently available in the official
151
151
  // protobuf release, and it is not used for type URLs beginning with
152
- // type.googleapis.com.
152
+ // type.googleapis.com. As of May 2023, there are no widely used type server
153
+ // implementations and no plans to implement one.
153
154
  //
154
155
  // Schemes other than `http`, `https` (or the empty scheme) might be
155
156
  // used with implementation specific semantics.
@@ -76,6 +76,11 @@ message CodeGeneratorRequest {
76
76
  // they import. The files will appear in topological order, so each file
77
77
  // appears before any file that imports it.
78
78
  //
79
+ // Note: the files listed in files_to_generate will include runtime-retention
80
+ // options only, but all other files will include source-retention options.
81
+ // The source_file_descriptors field below is available in case you need
82
+ // source-retention options for files_to_generate.
83
+ //
79
84
  // protoc guarantees that all proto_files will be written after
80
85
  // the fields above, even though this is not technically guaranteed by the
81
86
  // protobuf wire format. This theoretically could allow a plugin to stream
@@ -88,6 +93,11 @@ message CodeGeneratorRequest {
88
93
  // fully qualified.
89
94
  repeated FileDescriptorProto proto_file = 15;
90
95
 
96
+ // File descriptors with all options, including source-retention options.
97
+ // These descriptors are only provided for the files listed in
98
+ // files_to_generate.
99
+ repeated FileDescriptorProto source_file_descriptors = 17;
100
+
91
101
  // The version number of protocol compiler.
92
102
  optional Version compiler_version = 3;
93
103
  }
@@ -112,6 +122,7 @@ message CodeGeneratorResponse {
112
122
  enum Feature {
113
123
  FEATURE_NONE = 0;
114
124
  FEATURE_PROTO3_OPTIONAL = 1;
125
+ FEATURE_SUPPORTS_EDITIONS = 2;
115
126
  }
116
127
 
117
128
  // Represents a single generated file.
@@ -146,9 +146,6 @@ message ExtensionRangeOptions {
146
146
  // and enums.
147
147
  optional string type = 3;
148
148
 
149
- // Deprecated. Please use "repeated".
150
- optional bool is_repeated = 4 [deprecated = true];
151
-
152
149
  // If true, indicates that the number is reserved in the extension range,
153
150
  // and any extension field with the number will fail to compile. Set this
154
151
  // when a declared extension field is deleted.
@@ -157,14 +154,18 @@ message ExtensionRangeOptions {
157
154
  // If true, indicates that the extension must be defined as repeated.
158
155
  // Otherwise the extension must be defined as optional.
159
156
  optional bool repeated = 6;
157
+
158
+ reserved 4; // removed is_repeated
160
159
  }
161
160
 
162
- // go/protobuf-stripping-extension-declarations
163
- // Like Metadata, but we use a repeated field to hold all extension
164
- // declarations. This should avoid the size increases of transforming a large
165
- // extension range into small ranges in generated binaries.
161
+ // For external users: DO NOT USE. We are in the process of open sourcing
162
+ // extension declaration and executing internal cleanups before it can be
163
+ // used externally.
166
164
  repeated Declaration declaration = 2 [retention = RETENTION_SOURCE];
167
165
 
166
+ // Any features defined in the specific edition.
167
+ optional FeatureSet features = 50;
168
+
168
169
  // The verification state of the extension range.
169
170
  enum VerificationState {
170
171
  // All the extensions of the range must be declared.
@@ -491,6 +492,9 @@ message FileOptions {
491
492
  // determining the ruby package.
492
493
  optional string ruby_package = 45;
493
494
 
495
+ // Any features defined in the specific edition.
496
+ optional FeatureSet features = 50;
497
+
494
498
  // The parser stores options it doesn't recognize here.
495
499
  // See the documentation for the "Options" section above.
496
500
  repeated UninterpretedOption uninterpreted_option = 999;
@@ -574,6 +578,9 @@ message MessageOptions {
574
578
  // teams have had time to migrate.
575
579
  optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];
576
580
 
581
+ // Any features defined in the specific edition.
582
+ optional FeatureSet features = 12;
583
+
577
584
  // The parser stores options it doesn't recognize here. See above.
578
585
  repeated UninterpretedOption uninterpreted_option = 999;
579
586
 
@@ -711,19 +718,31 @@ message FieldOptions {
711
718
  TARGET_TYPE_METHOD = 9;
712
719
  }
713
720
 
714
- optional OptionTargetType target = 18 [deprecated = true];
715
721
  repeated OptionTargetType targets = 19;
716
722
 
723
+ message EditionDefault {
724
+ optional string edition = 1;
725
+ optional string value = 2; // Textproto value.
726
+ }
727
+ repeated EditionDefault edition_defaults = 20;
728
+
729
+ // Any features defined in the specific edition.
730
+ optional FeatureSet features = 21;
731
+
717
732
  // The parser stores options it doesn't recognize here. See above.
718
733
  repeated UninterpretedOption uninterpreted_option = 999;
719
734
 
720
735
  // Clients can define custom options in extensions of this message. See above.
721
736
  extensions 1000 to max;
722
737
 
723
- reserved 4; // removed jtype
738
+ reserved 4; // removed jtype
739
+ reserved 18; // reserve target, target_obsolete_do_not_use
724
740
  }
725
741
 
726
742
  message OneofOptions {
743
+ // Any features defined in the specific edition.
744
+ optional FeatureSet features = 1;
745
+
727
746
  // The parser stores options it doesn't recognize here. See above.
728
747
  repeated UninterpretedOption uninterpreted_option = 999;
729
748
 
@@ -753,6 +772,9 @@ message EnumOptions {
753
772
  // had time to migrate.
754
773
  optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];
755
774
 
775
+ // Any features defined in the specific edition.
776
+ optional FeatureSet features = 7;
777
+
756
778
  // The parser stores options it doesn't recognize here. See above.
757
779
  repeated UninterpretedOption uninterpreted_option = 999;
758
780
 
@@ -767,6 +789,14 @@ message EnumValueOptions {
767
789
  // this is a formalization for deprecating enum values.
768
790
  optional bool deprecated = 1 [default = false];
769
791
 
792
+ // Any features defined in the specific edition.
793
+ optional FeatureSet features = 2;
794
+
795
+ // Indicate that fields annotated with this enum value should not be printed
796
+ // out when using debug formats, e.g. when the field contains sensitive
797
+ // credentials.
798
+ optional bool debug_redact = 3 [default = false];
799
+
770
800
  // The parser stores options it doesn't recognize here. See above.
771
801
  repeated UninterpretedOption uninterpreted_option = 999;
772
802
 
@@ -776,6 +806,9 @@ message EnumValueOptions {
776
806
 
777
807
  message ServiceOptions {
778
808
 
809
+ // Any features defined in the specific edition.
810
+ optional FeatureSet features = 34;
811
+
779
812
  // Note: Field numbers 1 through 32 are reserved for Google's internal RPC
780
813
  // framework. We apologize for hoarding these numbers to ourselves, but
781
814
  // we were already using them long before we decided to release Protocol
@@ -818,6 +851,9 @@ message MethodOptions {
818
851
  optional IdempotencyLevel idempotency_level = 34
819
852
  [default = IDEMPOTENCY_UNKNOWN];
820
853
 
854
+ // Any features defined in the specific edition.
855
+ optional FeatureSet features = 35;
856
+
821
857
  // The parser stores options it doesn't recognize here. See above.
822
858
  repeated UninterpretedOption uninterpreted_option = 999;
823
859
 
@@ -853,6 +889,99 @@ message UninterpretedOption {
853
889
  optional string aggregate_value = 8;
854
890
  }
855
891
 
892
+ // ===================================================================
893
+ // Features
894
+
895
+ // TODO(b/274655146) Enums in C++ gencode (and potentially other languages) are
896
+ // not well scoped. This means that each of the feature enums below can clash
897
+ // with each other. The short names we've chosen maximize call-site
898
+ // readability, but leave us very open to this scenario. A future feature will
899
+ // be designed and implemented to handle this, hopefully before we ever hit a
900
+ // conflict here.
901
+ message FeatureSet {
902
+ enum FieldPresence {
903
+ FIELD_PRESENCE_UNKNOWN = 0;
904
+ EXPLICIT = 1;
905
+ IMPLICIT = 2;
906
+ LEGACY_REQUIRED = 3;
907
+ }
908
+ optional FieldPresence field_presence = 1 [
909
+ retention = RETENTION_RUNTIME,
910
+ targets = TARGET_TYPE_FIELD,
911
+ targets = TARGET_TYPE_FILE,
912
+ edition_defaults = { edition: "2023", value: "EXPLICIT" }
913
+ ];
914
+
915
+ enum EnumType {
916
+ ENUM_TYPE_UNKNOWN = 0;
917
+ OPEN = 1;
918
+ CLOSED = 2;
919
+ }
920
+ optional EnumType enum_type = 2 [
921
+ retention = RETENTION_RUNTIME,
922
+ targets = TARGET_TYPE_ENUM,
923
+ targets = TARGET_TYPE_FILE,
924
+ edition_defaults = { edition: "2023", value: "OPEN" }
925
+ ];
926
+
927
+ enum RepeatedFieldEncoding {
928
+ REPEATED_FIELD_ENCODING_UNKNOWN = 0;
929
+ PACKED = 1;
930
+ EXPANDED = 2;
931
+ }
932
+ optional RepeatedFieldEncoding repeated_field_encoding = 3 [
933
+ retention = RETENTION_RUNTIME,
934
+ targets = TARGET_TYPE_FIELD,
935
+ targets = TARGET_TYPE_FILE,
936
+ edition_defaults = { edition: "2023", value: "PACKED" }
937
+ ];
938
+
939
+ enum StringFieldValidation {
940
+ STRING_FIELD_VALIDATION_UNKNOWN = 0;
941
+ MANDATORY = 1;
942
+ HINT = 2;
943
+ NONE = 3;
944
+ }
945
+ optional StringFieldValidation string_field_validation = 4 [
946
+ retention = RETENTION_RUNTIME,
947
+ targets = TARGET_TYPE_FIELD,
948
+ targets = TARGET_TYPE_FILE,
949
+ edition_defaults = { edition: "2023", value: "MANDATORY" }
950
+ ];
951
+
952
+ enum MessageEncoding {
953
+ MESSAGE_ENCODING_UNKNOWN = 0;
954
+ LENGTH_PREFIXED = 1;
955
+ DELIMITED = 2;
956
+ }
957
+ optional MessageEncoding message_encoding = 5 [
958
+ retention = RETENTION_RUNTIME,
959
+ targets = TARGET_TYPE_FIELD,
960
+ targets = TARGET_TYPE_FILE,
961
+ edition_defaults = { edition: "2023", value: "LENGTH_PREFIXED" }
962
+ ];
963
+
964
+ enum JsonFormat {
965
+ JSON_FORMAT_UNKNOWN = 0;
966
+ ALLOW = 1;
967
+ LEGACY_BEST_EFFORT = 2;
968
+ }
969
+ optional JsonFormat json_format = 6 [
970
+ retention = RETENTION_RUNTIME,
971
+ targets = TARGET_TYPE_MESSAGE,
972
+ targets = TARGET_TYPE_ENUM,
973
+ targets = TARGET_TYPE_FILE,
974
+ edition_defaults = { edition: "2023", value: "ALLOW" }
975
+ ];
976
+
977
+ optional FeatureSet raw_features = 999 [targets = TARGET_TYPE_UNKNOWN];
978
+
979
+ extensions 1000; // for Protobuf C++
980
+ extensions 1001; // for Protobuf Java
981
+
982
+ extensions 9995 to 9999; // For internal testing
983
+ }
984
+
856
985
  // ===================================================================
857
986
  // Optional source code info
858
987
 
Binary file
Binary file
@@ -149,7 +149,8 @@ message Any {
149
149
  //
150
150
  // Note: this functionality is not currently available in the official
151
151
  // protobuf release, and it is not used for type URLs beginning with
152
- // type.googleapis.com.
152
+ // type.googleapis.com. As of May 2023, there are no widely used type server
153
+ // implementations and no plans to implement one.
153
154
  //
154
155
  // Schemes other than `http`, `https` (or the empty scheme) might be
155
156
  // used with implementation specific semantics.
@@ -76,6 +76,11 @@ message CodeGeneratorRequest {
76
76
  // they import. The files will appear in topological order, so each file
77
77
  // appears before any file that imports it.
78
78
  //
79
+ // Note: the files listed in files_to_generate will include runtime-retention
80
+ // options only, but all other files will include source-retention options.
81
+ // The source_file_descriptors field below is available in case you need
82
+ // source-retention options for files_to_generate.
83
+ //
79
84
  // protoc guarantees that all proto_files will be written after
80
85
  // the fields above, even though this is not technically guaranteed by the
81
86
  // protobuf wire format. This theoretically could allow a plugin to stream
@@ -88,6 +93,11 @@ message CodeGeneratorRequest {
88
93
  // fully qualified.
89
94
  repeated FileDescriptorProto proto_file = 15;
90
95
 
96
+ // File descriptors with all options, including source-retention options.
97
+ // These descriptors are only provided for the files listed in
98
+ // files_to_generate.
99
+ repeated FileDescriptorProto source_file_descriptors = 17;
100
+
91
101
  // The version number of protocol compiler.
92
102
  optional Version compiler_version = 3;
93
103
  }
@@ -112,6 +122,7 @@ message CodeGeneratorResponse {
112
122
  enum Feature {
113
123
  FEATURE_NONE = 0;
114
124
  FEATURE_PROTO3_OPTIONAL = 1;
125
+ FEATURE_SUPPORTS_EDITIONS = 2;
115
126
  }
116
127
 
117
128
  // Represents a single generated file.