Skip to content

Commit a48bd5b

Browse files
update descriptor.proto to latest version
1 parent 11b29b5 commit a48bd5b

File tree

3 files changed

+282
-24
lines changed

3 files changed

+282
-24
lines changed

google/protobuf/descriptor.json

Lines changed: 112 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@
7272
"type": "int32",
7373
"id": 11
7474
},
75+
"optionDependency": {
76+
"rule": "repeated",
77+
"type": "string",
78+
"id": 15
79+
},
7580
"messageType": {
7681
"rule": "repeated",
7782
"type": "DescriptorProto",
@@ -160,6 +165,10 @@
160165
"rule": "repeated",
161166
"type": "string",
162167
"id": 10
168+
},
169+
"visibility": {
170+
"type": "SymbolVisibility",
171+
"id": 11
163172
}
164173
},
165174
"nested": {
@@ -385,6 +394,10 @@
385394
"rule": "repeated",
386395
"type": "string",
387396
"id": 5
397+
},
398+
"visibility": {
399+
"type": "SymbolVisibility",
400+
"id": 6
388401
}
389402
},
390403
"nested": {
@@ -691,7 +704,10 @@
691704
},
692705
"weak": {
693706
"type": "bool",
694-
"id": 10
707+
"id": 10,
708+
"options": {
709+
"deprecated": true
710+
}
695711
},
696712
"debugRedact": {
697713
"type": "bool",
@@ -1023,31 +1039,91 @@
10231039
"fields": {
10241040
"fieldPresence": {
10251041
"type": "FieldPresence",
1026-
"id": 1
1042+
"id": 1,
1043+
"options": {
1044+
"retention": "RETENTION_RUNTIME",
1045+
"targets": "TARGET_TYPE_FILE",
1046+
"feature_support.edition_introduced": "EDITION_2023",
1047+
"edition_defaults.edition": "EDITION_2023",
1048+
"edition_defaults.value": "EXPLICIT"
1049+
}
10271050
},
10281051
"enumType": {
10291052
"type": "EnumType",
1030-
"id": 2
1053+
"id": 2,
1054+
"options": {
1055+
"retention": "RETENTION_RUNTIME",
1056+
"targets": "TARGET_TYPE_FILE",
1057+
"feature_support.edition_introduced": "EDITION_2023",
1058+
"edition_defaults.edition": "EDITION_PROTO3",
1059+
"edition_defaults.value": "OPEN"
1060+
}
10311061
},
10321062
"repeatedFieldEncoding": {
10331063
"type": "RepeatedFieldEncoding",
1034-
"id": 3
1064+
"id": 3,
1065+
"options": {
1066+
"retention": "RETENTION_RUNTIME",
1067+
"targets": "TARGET_TYPE_FILE",
1068+
"feature_support.edition_introduced": "EDITION_2023",
1069+
"edition_defaults.edition": "EDITION_PROTO3",
1070+
"edition_defaults.value": "PACKED"
1071+
}
10351072
},
10361073
"utf8Validation": {
10371074
"type": "Utf8Validation",
1038-
"id": 4
1075+
"id": 4,
1076+
"options": {
1077+
"retention": "RETENTION_RUNTIME",
1078+
"targets": "TARGET_TYPE_FILE",
1079+
"feature_support.edition_introduced": "EDITION_2023",
1080+
"edition_defaults.edition": "EDITION_PROTO3",
1081+
"edition_defaults.value": "VERIFY"
1082+
}
10391083
},
10401084
"messageEncoding": {
10411085
"type": "MessageEncoding",
1042-
"id": 5
1086+
"id": 5,
1087+
"options": {
1088+
"retention": "RETENTION_RUNTIME",
1089+
"targets": "TARGET_TYPE_FILE",
1090+
"feature_support.edition_introduced": "EDITION_2023",
1091+
"edition_defaults.edition": "EDITION_LEGACY",
1092+
"edition_defaults.value": "LENGTH_PREFIXED"
1093+
}
10431094
},
10441095
"jsonFormat": {
10451096
"type": "JsonFormat",
1046-
"id": 6
1097+
"id": 6,
1098+
"options": {
1099+
"retention": "RETENTION_RUNTIME",
1100+
"targets": "TARGET_TYPE_FILE",
1101+
"feature_support.edition_introduced": "EDITION_2023",
1102+
"edition_defaults.edition": "EDITION_PROTO3",
1103+
"edition_defaults.value": "ALLOW"
1104+
}
10471105
},
10481106
"enforceNamingStyle": {
10491107
"type": "EnforceNamingStyle",
1050-
"id": 7
1108+
"id": 7,
1109+
"options": {
1110+
"retention": "RETENTION_SOURCE",
1111+
"targets": "TARGET_TYPE_METHOD",
1112+
"feature_support.edition_introduced": "EDITION_2024",
1113+
"edition_defaults.edition": "EDITION_2024",
1114+
"edition_defaults.value": "STYLE2024"
1115+
}
1116+
},
1117+
"defaultSymbolVisibility": {
1118+
"type": "VisibilityFeature.DefaultSymbolVisibility",
1119+
"id": 8,
1120+
"options": {
1121+
"retention": "RETENTION_SOURCE",
1122+
"targets": "TARGET_TYPE_FILE",
1123+
"feature_support.edition_introduced": "EDITION_2024",
1124+
"edition_defaults.edition": "EDITION_2024",
1125+
"edition_defaults.value": "EXPORT_TOP_LEVEL"
1126+
}
10511127
}
10521128
},
10531129
"extensions": [
@@ -1120,6 +1196,26 @@
11201196
"STYLE2024": 1,
11211197
"STYLE_LEGACY": 2
11221198
}
1199+
},
1200+
"VisibilityFeature": {
1201+
"fields": {},
1202+
"reserved": [
1203+
[
1204+
1,
1205+
536870911
1206+
]
1207+
],
1208+
"nested": {
1209+
"DefaultSymbolVisibility": {
1210+
"values": {
1211+
"DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0,
1212+
"EXPORT_ALL": 1,
1213+
"EXPORT_TOP_LEVEL": 2,
1214+
"LOCAL_ALL": 3,
1215+
"STRICT": 4
1216+
}
1217+
}
1218+
}
11231219
}
11241220
}
11251221
},
@@ -1269,6 +1365,14 @@
12691365
}
12701366
}
12711367
}
1368+
},
1369+
"SymbolVisibility": {
1370+
"edition": "proto2",
1371+
"values": {
1372+
"VISIBILITY_UNSET": 0,
1373+
"VISIBILITY_LOCAL": 1,
1374+
"VISIBILITY_EXPORT": 2
1375+
}
12721376
}
12731377
}
12741378
}

google/protobuf/descriptor.proto

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ message FileDescriptorProto {
4040
repeated string dependency = 3;
4141
repeated int32 public_dependency = 10;
4242
repeated int32 weak_dependency = 11;
43+
repeated string option_dependency = 15;
4344
repeated DescriptorProto message_type = 4;
4445
repeated EnumDescriptorProto enum_type = 5;
4546
repeated ServiceDescriptorProto service = 6;
@@ -62,6 +63,7 @@ message DescriptorProto {
6263
optional MessageOptions options = 7;
6364
repeated ReservedRange reserved_range = 9;
6465
repeated string reserved_name = 10;
66+
optional SymbolVisibility visibility = 11;
6567

6668
message ExtensionRange {
6769

@@ -161,6 +163,7 @@ message EnumDescriptorProto {
161163
optional EnumOptions options = 3;
162164
repeated EnumReservedRange reserved_range = 4;
163165
repeated string reserved_name = 5;
166+
optional SymbolVisibility visibility = 6;
164167

165168
message EnumReservedRange {
166169

@@ -252,7 +255,7 @@ message FieldOptions {
252255
optional bool lazy = 5;
253256
optional bool unverified_lazy = 15;
254257
optional bool deprecated = 3;
255-
optional bool weak = 10;
258+
optional bool weak = 10 [deprecated=true];
256259
optional bool debug_redact = 16;
257260
optional OptionRetention retention = 17;
258261
repeated OptionTargetType targets = 19;
@@ -392,13 +395,14 @@ message UninterpretedOption {
392395

393396
message FeatureSet {
394397

395-
optional FieldPresence field_presence = 1;
396-
optional EnumType enum_type = 2;
397-
optional RepeatedFieldEncoding repeated_field_encoding = 3;
398-
optional Utf8Validation utf8_validation = 4;
399-
optional MessageEncoding message_encoding = 5;
400-
optional JsonFormat json_format = 6;
401-
optional EnforceNamingStyle enforce_naming_style = 7;
398+
optional FieldPresence field_presence = 1 [retention="RETENTION_RUNTIME", targets="TARGET_TYPE_FILE", feature_support.edition_introduced="EDITION_2023", edition_defaults.edition="EDITION_2023", edition_defaults.value="EXPLICIT"];
399+
optional EnumType enum_type = 2 [retention="RETENTION_RUNTIME", targets="TARGET_TYPE_FILE", feature_support.edition_introduced="EDITION_2023", edition_defaults.edition="EDITION_PROTO3", edition_defaults.value="OPEN"];
400+
optional RepeatedFieldEncoding repeated_field_encoding = 3 [retention="RETENTION_RUNTIME", targets="TARGET_TYPE_FILE", feature_support.edition_introduced="EDITION_2023", edition_defaults.edition="EDITION_PROTO3", edition_defaults.value="PACKED"];
401+
optional Utf8Validation utf8_validation = 4 [retention="RETENTION_RUNTIME", targets="TARGET_TYPE_FILE", feature_support.edition_introduced="EDITION_2023", edition_defaults.edition="EDITION_PROTO3", edition_defaults.value="VERIFY"];
402+
optional MessageEncoding message_encoding = 5 [retention="RETENTION_RUNTIME", targets="TARGET_TYPE_FILE", feature_support.edition_introduced="EDITION_2023", edition_defaults.edition="EDITION_LEGACY", edition_defaults.value="LENGTH_PREFIXED"];
403+
optional JsonFormat json_format = 6 [retention="RETENTION_RUNTIME", targets="TARGET_TYPE_FILE", feature_support.edition_introduced="EDITION_2023", edition_defaults.edition="EDITION_PROTO3", edition_defaults.value="ALLOW"];
404+
optional EnforceNamingStyle enforce_naming_style = 7 [retention="RETENTION_SOURCE", targets="TARGET_TYPE_METHOD", feature_support.edition_introduced="EDITION_2024", edition_defaults.edition="EDITION_2024", edition_defaults.value="STYLE2024"];
405+
optional VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility = 8 [retention="RETENTION_SOURCE", targets="TARGET_TYPE_FILE", feature_support.edition_introduced="EDITION_2024", edition_defaults.edition="EDITION_2024", edition_defaults.value="EXPORT_TOP_LEVEL"];
402406

403407
enum FieldPresence {
404408

@@ -450,6 +454,20 @@ message FeatureSet {
450454
STYLE_LEGACY = 2;
451455
}
452456

457+
message VisibilityFeature {
458+
459+
enum DefaultSymbolVisibility {
460+
461+
DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0;
462+
EXPORT_ALL = 1;
463+
EXPORT_TOP_LEVEL = 2;
464+
LOCAL_ALL = 3;
465+
STRICT = 4;
466+
}
467+
468+
reserved 1 to max;
469+
}
470+
453471
extensions 1000 to 9994, 9995 to 9999, 10000;
454472

455473
reserved 999;
@@ -506,4 +524,11 @@ message GeneratedCodeInfo {
506524
ALIAS = 2;
507525
}
508526
}
527+
}
528+
529+
enum SymbolVisibility {
530+
531+
VISIBILITY_UNSET = 0;
532+
VISIBILITY_LOCAL = 1;
533+
VISIBILITY_EXPORT = 2;
509534
}

0 commit comments

Comments
 (0)