grpc-tools 1.56.2 → 1.60.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: ab8d2fbaaca78b23ab101fc5b459fa9f51736f1efe0413d4970e6a7e62377b12
4
- data.tar.gz: 7f1e8d23ee113d9e7a06814c23d7097b350869d37453b3aeccc07641dcc369f6
3
+ metadata.gz: 2a60dd37a9c221c073c0003e490d539b0224650001e8f3fef3455b3ce2e552e2
4
+ data.tar.gz: 5028309eb666ddd7f1496e4d652aee9258faff445912402a23580ca74ad02a29
5
5
  SHA512:
6
- metadata.gz: 31414796a0b1a9d45da300cc7e91026dcc79b4307a8a1d6305bc2aa9946b390af6671236331c6e99e127fc9f0a4dbe921f0ee79ce84dcab2282944eb2017e0bb
7
- data.tar.gz: e5a153b8916d61318bef2689bd56854dc9d94ddbb617e73e1155e8cb4eec3329602591db5e8b992739bd8c0f954533db18aaa28d6b757b6c550d894a0bd3f201
6
+ metadata.gz: 813bdc00ab909a2b4f97b2d7a9b99d1c8b4821eaebd4bda9acbec82544c75174815e809bbb17a5c8f867f416474708a603125b1f8b120992555a139372b22d8f
7
+ data.tar.gz: bc5394522efd7914dad242951d6cd8f610ec508236bbbcd0c5e6e5965f9e32bb88d4a1eeb1c7decf5e88fc51bcd22314bc9f475248ec7b680b43c8115450393e
@@ -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.
@@ -1,32 +1,9 @@
1
1
  // Protocol Buffers - Google's data interchange format
2
2
  // Copyright 2008 Google Inc. All rights reserved.
3
- // https://developers.google.com/protocol-buffers/
4
3
  //
5
- // Redistribution and use in source and binary forms, with or without
6
- // modification, are permitted provided that the following conditions are
7
- // met:
8
- //
9
- // * Redistributions of source code must retain the above copyright
10
- // notice, this list of conditions and the following disclaimer.
11
- // * Redistributions in binary form must reproduce the above
12
- // copyright notice, this list of conditions and the following disclaimer
13
- // in the documentation and/or other materials provided with the
14
- // distribution.
15
- // * Neither the name of Google Inc. nor the names of its
16
- // contributors may be used to endorse or promote products derived from
17
- // this software without specific prior written permission.
18
- //
19
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4
+ // Use of this source code is governed by a BSD-style
5
+ // license that can be found in the LICENSE file or at
6
+ // https://developers.google.com/open-source/licenses/bsd
30
7
 
31
8
  // Author: kenton@google.com (Kenton Varda)
32
9
  //
@@ -76,6 +53,11 @@ message CodeGeneratorRequest {
76
53
  // they import. The files will appear in topological order, so each file
77
54
  // appears before any file that imports it.
78
55
  //
56
+ // Note: the files listed in files_to_generate will include runtime-retention
57
+ // options only, but all other files will include source-retention options.
58
+ // The source_file_descriptors field below is available in case you need
59
+ // source-retention options for files_to_generate.
60
+ //
79
61
  // protoc guarantees that all proto_files will be written after
80
62
  // the fields above, even though this is not technically guaranteed by the
81
63
  // protobuf wire format. This theoretically could allow a plugin to stream
@@ -88,6 +70,11 @@ message CodeGeneratorRequest {
88
70
  // fully qualified.
89
71
  repeated FileDescriptorProto proto_file = 15;
90
72
 
73
+ // File descriptors with all options, including source-retention options.
74
+ // These descriptors are only provided for the files listed in
75
+ // files_to_generate.
76
+ repeated FileDescriptorProto source_file_descriptors = 17;
77
+
91
78
  // The version number of protocol compiler.
92
79
  optional Version compiler_version = 3;
93
80
  }
@@ -112,6 +99,7 @@ message CodeGeneratorResponse {
112
99
  enum Feature {
113
100
  FEATURE_NONE = 0;
114
101
  FEATURE_PROTO3_OPTIONAL = 1;
102
+ FEATURE_SUPPORTS_EDITIONS = 2;
115
103
  }
116
104
 
117
105
  // Represents a single generated file.
@@ -57,6 +57,32 @@ message FileDescriptorSet {
57
57
  repeated FileDescriptorProto file = 1;
58
58
  }
59
59
 
60
+ // The full set of known editions.
61
+ enum Edition {
62
+ // A placeholder for an unknown edition value.
63
+ EDITION_UNKNOWN = 0;
64
+
65
+ // Legacy syntax "editions". These pre-date editions, but behave much like
66
+ // distinct editions. These can't be used to specify the edition of proto
67
+ // files, but feature definitions must supply proto2/proto3 defaults for
68
+ // backwards compatibility.
69
+ EDITION_PROTO2 = 998;
70
+ EDITION_PROTO3 = 999;
71
+
72
+ // Editions that have been released. The specific values are arbitrary and
73
+ // should not be depended on, but they will always be time-ordered for easy
74
+ // comparison.
75
+ EDITION_2023 = 1000;
76
+
77
+ // Placeholder editions for testing feature resolution. These should not be
78
+ // used or relyed on outside of tests.
79
+ EDITION_1_TEST_ONLY = 1;
80
+ EDITION_2_TEST_ONLY = 2;
81
+ EDITION_99997_TEST_ONLY = 99997;
82
+ EDITION_99998_TEST_ONLY = 99998;
83
+ EDITION_99999_TEST_ONLY = 99999;
84
+ }
85
+
60
86
  // Describes a complete .proto file.
61
87
  message FileDescriptorProto {
62
88
  optional string name = 1; // file name, relative to root of source tree
@@ -90,8 +116,8 @@ message FileDescriptorProto {
90
116
  // If `edition` is present, this value must be "editions".
91
117
  optional string syntax = 12;
92
118
 
93
- // The edition of the proto file, which is an opaque string.
94
- optional string edition = 13;
119
+ // The edition of the proto file.
120
+ optional Edition edition = 14;
95
121
  }
96
122
 
97
123
  // Describes a message type.
@@ -146,9 +172,6 @@ message ExtensionRangeOptions {
146
172
  // and enums.
147
173
  optional string type = 3;
148
174
 
149
- // Deprecated. Please use "repeated".
150
- optional bool is_repeated = 4 [deprecated = true];
151
-
152
175
  // If true, indicates that the number is reserved in the extension range,
153
176
  // and any extension field with the number will fail to compile. Set this
154
177
  // when a declared extension field is deleted.
@@ -157,14 +180,18 @@ message ExtensionRangeOptions {
157
180
  // If true, indicates that the extension must be defined as repeated.
158
181
  // Otherwise the extension must be defined as optional.
159
182
  optional bool repeated = 6;
183
+
184
+ reserved 4; // removed is_repeated
160
185
  }
161
186
 
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.
187
+ // For external users: DO NOT USE. We are in the process of open sourcing
188
+ // extension declaration and executing internal cleanups before it can be
189
+ // used externally.
166
190
  repeated Declaration declaration = 2 [retention = RETENTION_SOURCE];
167
191
 
192
+ // Any features defined in the specific edition.
193
+ optional FeatureSet features = 50;
194
+
168
195
  // The verification state of the extension range.
169
196
  enum VerificationState {
170
197
  // All the extensions of the range must be declared.
@@ -173,7 +200,7 @@ message ExtensionRangeOptions {
173
200
  }
174
201
 
175
202
  // The verification state of the range.
176
- // TODO(b/278783756): flip the default to DECLARATION once all empty ranges
203
+ // TODO: flip the default to DECLARATION once all empty ranges
177
204
  // are marked as UNVERIFIED.
178
205
  optional VerificationState verification = 3 [default = UNVERIFIED];
179
206
 
@@ -200,9 +227,10 @@ message FieldDescriptorProto {
200
227
  TYPE_BOOL = 8;
201
228
  TYPE_STRING = 9;
202
229
  // Tag-delimited aggregate.
203
- // Group type is deprecated and not supported in proto3. However, Proto3
230
+ // Group type is deprecated and not supported after google.protobuf. However, Proto3
204
231
  // implementations should still be able to parse the group wire format and
205
- // treat group fields as unknown fields.
232
+ // treat group fields as unknown fields. In Editions, the group wire format
233
+ // can be enabled via the `message_encoding` feature.
206
234
  TYPE_GROUP = 10;
207
235
  TYPE_MESSAGE = 11; // Length-delimited aggregate.
208
236
 
@@ -219,8 +247,11 @@ message FieldDescriptorProto {
219
247
  enum Label {
220
248
  // 0 is reserved for errors
221
249
  LABEL_OPTIONAL = 1;
222
- LABEL_REQUIRED = 2;
223
250
  LABEL_REPEATED = 3;
251
+ // The required label is only allowed in google.protobuf. In proto3 and Editions
252
+ // it's explicitly prohibited. In Editions, the `field_presence` feature
253
+ // can be used to get this behavior.
254
+ LABEL_REQUIRED = 2;
224
255
  }
225
256
 
226
257
  optional string name = 1;
@@ -491,6 +522,9 @@ message FileOptions {
491
522
  // determining the ruby package.
492
523
  optional string ruby_package = 45;
493
524
 
525
+ // Any features defined in the specific edition.
526
+ optional FeatureSet features = 50;
527
+
494
528
  // The parser stores options it doesn't recognize here.
495
529
  // See the documentation for the "Options" section above.
496
530
  repeated UninterpretedOption uninterpreted_option = 999;
@@ -570,10 +604,13 @@ message MessageOptions {
570
604
  // This should only be used as a temporary measure against broken builds due
571
605
  // to the change in behavior for JSON field name conflicts.
572
606
  //
573
- // TODO(b/261750190) This is legacy behavior we plan to remove once downstream
607
+ // TODO This is legacy behavior we plan to remove once downstream
574
608
  // teams have had time to migrate.
575
609
  optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];
576
610
 
611
+ // Any features defined in the specific edition.
612
+ optional FeatureSet features = 12;
613
+
577
614
  // The parser stores options it doesn't recognize here. See above.
578
615
  repeated UninterpretedOption uninterpreted_option = 999;
579
616
 
@@ -607,7 +644,9 @@ message FieldOptions {
607
644
  // a more efficient representation on the wire. Rather than repeatedly
608
645
  // writing the tag and type for each element, the entire array is encoded as
609
646
  // a single length-delimited blob. In proto3, only explicit setting it to
610
- // false will avoid using packed encoding.
647
+ // false will avoid using packed encoding. This option is prohibited in
648
+ // Editions, but the `repeated_field_encoding` feature can be used to control
649
+ // the behavior.
611
650
  optional bool packed = 2;
612
651
 
613
652
  // The jstype option determines the JavaScript type used for values of the
@@ -711,19 +750,31 @@ message FieldOptions {
711
750
  TARGET_TYPE_METHOD = 9;
712
751
  }
713
752
 
714
- optional OptionTargetType target = 18 [deprecated = true];
715
753
  repeated OptionTargetType targets = 19;
716
754
 
755
+ message EditionDefault {
756
+ optional Edition edition = 3;
757
+ optional string value = 2; // Textproto value.
758
+ }
759
+ repeated EditionDefault edition_defaults = 20;
760
+
761
+ // Any features defined in the specific edition.
762
+ optional FeatureSet features = 21;
763
+
717
764
  // The parser stores options it doesn't recognize here. See above.
718
765
  repeated UninterpretedOption uninterpreted_option = 999;
719
766
 
720
767
  // Clients can define custom options in extensions of this message. See above.
721
768
  extensions 1000 to max;
722
769
 
723
- reserved 4; // removed jtype
770
+ reserved 4; // removed jtype
771
+ reserved 18; // reserve target, target_obsolete_do_not_use
724
772
  }
725
773
 
726
774
  message OneofOptions {
775
+ // Any features defined in the specific edition.
776
+ optional FeatureSet features = 1;
777
+
727
778
  // The parser stores options it doesn't recognize here. See above.
728
779
  repeated UninterpretedOption uninterpreted_option = 999;
729
780
 
@@ -749,10 +800,13 @@ message EnumOptions {
749
800
  // and strips underscored from the fields before comparison in proto3 only.
750
801
  // The new behavior takes `json_name` into account and applies to proto2 as
751
802
  // well.
752
- // TODO(b/261750190) Remove this legacy behavior once downstream teams have
803
+ // TODO Remove this legacy behavior once downstream teams have
753
804
  // had time to migrate.
754
805
  optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];
755
806
 
807
+ // Any features defined in the specific edition.
808
+ optional FeatureSet features = 7;
809
+
756
810
  // The parser stores options it doesn't recognize here. See above.
757
811
  repeated UninterpretedOption uninterpreted_option = 999;
758
812
 
@@ -767,6 +821,14 @@ message EnumValueOptions {
767
821
  // this is a formalization for deprecating enum values.
768
822
  optional bool deprecated = 1 [default = false];
769
823
 
824
+ // Any features defined in the specific edition.
825
+ optional FeatureSet features = 2;
826
+
827
+ // Indicate that fields annotated with this enum value should not be printed
828
+ // out when using debug formats, e.g. when the field contains sensitive
829
+ // credentials.
830
+ optional bool debug_redact = 3 [default = false];
831
+
770
832
  // The parser stores options it doesn't recognize here. See above.
771
833
  repeated UninterpretedOption uninterpreted_option = 999;
772
834
 
@@ -776,6 +838,9 @@ message EnumValueOptions {
776
838
 
777
839
  message ServiceOptions {
778
840
 
841
+ // Any features defined in the specific edition.
842
+ optional FeatureSet features = 34;
843
+
779
844
  // Note: Field numbers 1 through 32 are reserved for Google's internal RPC
780
845
  // framework. We apologize for hoarding these numbers to ourselves, but
781
846
  // we were already using them long before we decided to release Protocol
@@ -818,6 +883,9 @@ message MethodOptions {
818
883
  optional IdempotencyLevel idempotency_level = 34
819
884
  [default = IDEMPOTENCY_UNKNOWN];
820
885
 
886
+ // Any features defined in the specific edition.
887
+ optional FeatureSet features = 35;
888
+
821
889
  // The parser stores options it doesn't recognize here. See above.
822
890
  repeated UninterpretedOption uninterpreted_option = 999;
823
891
 
@@ -853,6 +921,128 @@ message UninterpretedOption {
853
921
  optional string aggregate_value = 8;
854
922
  }
855
923
 
924
+ // ===================================================================
925
+ // Features
926
+
927
+ // TODO Enums in C++ gencode (and potentially other languages) are
928
+ // not well scoped. This means that each of the feature enums below can clash
929
+ // with each other. The short names we've chosen maximize call-site
930
+ // readability, but leave us very open to this scenario. A future feature will
931
+ // be designed and implemented to handle this, hopefully before we ever hit a
932
+ // conflict here.
933
+ message FeatureSet {
934
+ enum FieldPresence {
935
+ FIELD_PRESENCE_UNKNOWN = 0;
936
+ EXPLICIT = 1;
937
+ IMPLICIT = 2;
938
+ LEGACY_REQUIRED = 3;
939
+ }
940
+ optional FieldPresence field_presence = 1 [
941
+ retention = RETENTION_RUNTIME,
942
+ targets = TARGET_TYPE_FIELD,
943
+ targets = TARGET_TYPE_FILE,
944
+ edition_defaults = { edition: EDITION_PROTO2, value: "EXPLICIT" },
945
+ edition_defaults = { edition: EDITION_PROTO3, value: "IMPLICIT" },
946
+ edition_defaults = { edition: EDITION_2023, value: "EXPLICIT" }
947
+ ];
948
+
949
+ enum EnumType {
950
+ ENUM_TYPE_UNKNOWN = 0;
951
+ OPEN = 1;
952
+ CLOSED = 2;
953
+ }
954
+ optional EnumType enum_type = 2 [
955
+ retention = RETENTION_RUNTIME,
956
+ targets = TARGET_TYPE_ENUM,
957
+ targets = TARGET_TYPE_FILE,
958
+ edition_defaults = { edition: EDITION_PROTO2, value: "CLOSED" },
959
+ edition_defaults = { edition: EDITION_PROTO3, value: "OPEN" }
960
+ ];
961
+
962
+ enum RepeatedFieldEncoding {
963
+ REPEATED_FIELD_ENCODING_UNKNOWN = 0;
964
+ PACKED = 1;
965
+ EXPANDED = 2;
966
+ }
967
+ optional RepeatedFieldEncoding repeated_field_encoding = 3 [
968
+ retention = RETENTION_RUNTIME,
969
+ targets = TARGET_TYPE_FIELD,
970
+ targets = TARGET_TYPE_FILE,
971
+ edition_defaults = { edition: EDITION_PROTO2, value: "EXPANDED" },
972
+ edition_defaults = { edition: EDITION_PROTO3, value: "PACKED" }
973
+ ];
974
+
975
+ enum Utf8Validation {
976
+ UTF8_VALIDATION_UNKNOWN = 0;
977
+ NONE = 1;
978
+ VERIFY = 2;
979
+ }
980
+ optional Utf8Validation utf8_validation = 4 [
981
+ retention = RETENTION_RUNTIME,
982
+ targets = TARGET_TYPE_FIELD,
983
+ targets = TARGET_TYPE_FILE,
984
+ edition_defaults = { edition: EDITION_PROTO2, value: "NONE" },
985
+ edition_defaults = { edition: EDITION_PROTO3, value: "VERIFY" }
986
+ ];
987
+
988
+ enum MessageEncoding {
989
+ MESSAGE_ENCODING_UNKNOWN = 0;
990
+ LENGTH_PREFIXED = 1;
991
+ DELIMITED = 2;
992
+ }
993
+ optional MessageEncoding message_encoding = 5 [
994
+ retention = RETENTION_RUNTIME,
995
+ targets = TARGET_TYPE_FIELD,
996
+ targets = TARGET_TYPE_FILE,
997
+ edition_defaults = { edition: EDITION_PROTO2, value: "LENGTH_PREFIXED" }
998
+ ];
999
+
1000
+ enum JsonFormat {
1001
+ JSON_FORMAT_UNKNOWN = 0;
1002
+ ALLOW = 1;
1003
+ LEGACY_BEST_EFFORT = 2;
1004
+ }
1005
+ optional JsonFormat json_format = 6 [
1006
+ retention = RETENTION_RUNTIME,
1007
+ targets = TARGET_TYPE_MESSAGE,
1008
+ targets = TARGET_TYPE_ENUM,
1009
+ targets = TARGET_TYPE_FILE,
1010
+ edition_defaults = { edition: EDITION_PROTO2, value: "LEGACY_BEST_EFFORT" },
1011
+ edition_defaults = { edition: EDITION_PROTO3, value: "ALLOW" }
1012
+ ];
1013
+
1014
+ reserved 999;
1015
+
1016
+ extensions 1000; // for Protobuf C++
1017
+ extensions 1001; // for Protobuf Java
1018
+
1019
+ extensions 9995 to 9999; // For internal testing
1020
+ }
1021
+
1022
+ // A compiled specification for the defaults of a set of features. These
1023
+ // messages are generated from FeatureSet extensions and can be used to seed
1024
+ // feature resolution. The resolution with this object becomes a simple search
1025
+ // for the closest matching edition, followed by proto merges.
1026
+ message FeatureSetDefaults {
1027
+ // A map from every known edition with a unique set of defaults to its
1028
+ // defaults. Not all editions may be contained here. For a given edition,
1029
+ // the defaults at the closest matching edition ordered at or before it should
1030
+ // be used. This field must be in strict ascending order by edition.
1031
+ message FeatureSetEditionDefault {
1032
+ optional Edition edition = 3;
1033
+ optional FeatureSet features = 2;
1034
+ }
1035
+ repeated FeatureSetEditionDefault defaults = 1;
1036
+
1037
+ // The minimum supported edition (inclusive) when this was constructed.
1038
+ // Editions before this will not have defaults.
1039
+ optional Edition minimum_edition = 4;
1040
+
1041
+ // The maximum known edition (inclusive) when this was constructed. Editions
1042
+ // after this will not have reliable defaults.
1043
+ optional Edition maximum_edition = 5;
1044
+ }
1045
+
856
1046
  // ===================================================================
857
1047
  // Optional source code info
858
1048
 
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.
@@ -1,32 +1,9 @@
1
1
  // Protocol Buffers - Google's data interchange format
2
2
  // Copyright 2008 Google Inc. All rights reserved.
3
- // https://developers.google.com/protocol-buffers/
4
3
  //
5
- // Redistribution and use in source and binary forms, with or without
6
- // modification, are permitted provided that the following conditions are
7
- // met:
8
- //
9
- // * Redistributions of source code must retain the above copyright
10
- // notice, this list of conditions and the following disclaimer.
11
- // * Redistributions in binary form must reproduce the above
12
- // copyright notice, this list of conditions and the following disclaimer
13
- // in the documentation and/or other materials provided with the
14
- // distribution.
15
- // * Neither the name of Google Inc. nor the names of its
16
- // contributors may be used to endorse or promote products derived from
17
- // this software without specific prior written permission.
18
- //
19
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4
+ // Use of this source code is governed by a BSD-style
5
+ // license that can be found in the LICENSE file or at
6
+ // https://developers.google.com/open-source/licenses/bsd
30
7
 
31
8
  // Author: kenton@google.com (Kenton Varda)
32
9
  //
@@ -76,6 +53,11 @@ message CodeGeneratorRequest {
76
53
  // they import. The files will appear in topological order, so each file
77
54
  // appears before any file that imports it.
78
55
  //
56
+ // Note: the files listed in files_to_generate will include runtime-retention
57
+ // options only, but all other files will include source-retention options.
58
+ // The source_file_descriptors field below is available in case you need
59
+ // source-retention options for files_to_generate.
60
+ //
79
61
  // protoc guarantees that all proto_files will be written after
80
62
  // the fields above, even though this is not technically guaranteed by the
81
63
  // protobuf wire format. This theoretically could allow a plugin to stream
@@ -88,6 +70,11 @@ message CodeGeneratorRequest {
88
70
  // fully qualified.
89
71
  repeated FileDescriptorProto proto_file = 15;
90
72
 
73
+ // File descriptors with all options, including source-retention options.
74
+ // These descriptors are only provided for the files listed in
75
+ // files_to_generate.
76
+ repeated FileDescriptorProto source_file_descriptors = 17;
77
+
91
78
  // The version number of protocol compiler.
92
79
  optional Version compiler_version = 3;
93
80
  }
@@ -112,6 +99,7 @@ message CodeGeneratorResponse {
112
99
  enum Feature {
113
100
  FEATURE_NONE = 0;
114
101
  FEATURE_PROTO3_OPTIONAL = 1;
102
+ FEATURE_SUPPORTS_EDITIONS = 2;
115
103
  }
116
104
 
117
105
  // Represents a single generated file.