@@ -100,8 +100,8 @@ and `export` keywords to set per-field behavior. Read more about this at
100
100
to local.
101
101
* ` LOCAL_ALL ` : All symbols default to local.
102
102
* ` STRICT ` : All symbols local by default. Nested types cannot be exported,
103
- except for a special-case caveat for message ` { enum {} reserved 1 to max;
104
- }`. This is the recommended setting for new protos .
103
+ except for a special-case caveat for ` message { enum {} reserved 0 to max;
104
+ }`. This will become the default in a future edition .
105
105
106
106
** Applicable to the following scope:** Enum, Message
107
107
@@ -172,7 +172,7 @@ protos are round-trippable by default with a feature value to opt-out to use
172
172
173
173
** Applicable to the following scope:** File
174
174
175
- ** Added in:** 2024
175
+ ** Added in:** Edition 2024
176
176
177
177
** Default behavior per syntax/edition:**
178
178
@@ -231,7 +231,7 @@ and after of a proto3 file.
231
231
232
232
** Applicable to the following scopes:** File, Enum
233
233
234
- ** Added in:** 2023
234
+ ** Added in:** Edition 2023
235
235
236
236
** Default behavior per syntax/edition:**
237
237
@@ -292,7 +292,7 @@ whether a protobuf field has a value.
292
292
293
293
** Applicable to the following scopes:** File, Field
294
294
295
- ** Added in:** 2023
295
+ ** Added in:** Edition 2023
296
296
297
297
** Default behavior per syntax/edition:**
298
298
@@ -385,7 +385,7 @@ and after of a proto3 file. Editions behavior matches the behavior in proto3.
385
385
386
386
** Applicable to the following scopes:** File, Message, Enum
387
387
388
- ** Added in:** 2023
388
+ ** Added in:** Edition 2023
389
389
390
390
** Default behavior per syntax/edition:**
391
391
@@ -448,7 +448,7 @@ the following conditions are met:
448
448
449
449
** Applicable to the following scopes:** File, Field
450
450
451
- ** Added in:** 2023
451
+ ** Added in:** Edition 2023
452
452
453
453
** Default behavior per syntax/edition:**
454
454
@@ -504,7 +504,7 @@ for `repeated` fields has been migrated to in Editions.
504
504
505
505
** Applicable to the following scopes:** File, Field
506
506
507
- ** Added in:** 2023
507
+ ** Added in:** Edition 2023
508
508
509
509
** Default behavior per syntax/edition:**
510
510
@@ -583,7 +583,7 @@ and after of a proto3 file.
583
583
584
584
** Applicable to the following scopes:** File, Field
585
585
586
- ** Added in:** 2023
586
+ ** Added in:** Edition 2023
587
587
588
588
** Default behavior per syntax/edition:**
589
589
@@ -650,7 +650,7 @@ in the migration guide for more on this topic.
650
650
651
651
**Applicable to the following scopes:** Enum, File
652
652
653
- **Added in:** 2024
653
+ **Added in:** Edition 2024
654
654
655
655
**Default behavior per syntax/edition:**
656
656
@@ -680,7 +680,7 @@ example, switch statements are not supported.
680
680
681
681
**Applicable to the following scopes:** Enum
682
682
683
- **Added in:** 2024
683
+ **Added in:** Edition 2024
684
684
685
685
**Default behavior per syntax/edition:**
686
686
@@ -713,7 +713,7 @@ before and after of a proto3 file.
713
713
714
714
**Applicable to the following scopes:** File, Field
715
715
716
- **Added in:** 2023
716
+ **Added in:** Edition 2023
717
717
718
718
**Default behavior per syntax/edition:**
719
719
@@ -762,7 +762,7 @@ message Msg {
762
762
** Languages:** Java
763
763
764
764
This feature controls whether the Java generator will nest the generated class
765
- in the Java generated file class. Setting this option to ` Yes ` is the equivalent
765
+ in the Java generated file class. Setting this option to ` NO ` is the equivalent
766
766
of setting ` java_multiple_files = true ` in proto2/proto3/edition 2023.
767
767
768
768
The default outer classname is also updated to always be the camel-cased .proto
@@ -779,7 +779,7 @@ becomes `BarBazProto`). You can still override this using the
779
779
780
780
** Applicable to the following scopes:** Message, Enum, Service
781
781
782
- ** Added in:** 2024
782
+ ** Added in:** Edition 2024
783
783
784
784
** Default behavior per syntax/edition:**
785
785
@@ -812,7 +812,7 @@ removed.
812
812
813
813
** Applicable to the following scopes:** File, Field
814
814
815
- ** Added in:** 2023
815
+ ** Added in:** Edition 2023
816
816
817
817
** Default behavior per syntax/edition:**
818
818
@@ -893,7 +893,7 @@ before and after of a proto3 file.
893
893
894
894
** Applicable to the following scopes:** Field, File
895
895
896
- ** Added in:** 2023
896
+ ** Added in:** Edition 2023
897
897
898
898
** Default behavior per syntax/edition:**
899
899
@@ -974,7 +974,7 @@ generator strips the repetitive prefix or not.
974
974
975
975
** Applicable to the following scopes:** Enum, File
976
976
977
- ** Added in:** 2024
977
+ ** Added in:** Edition 2024
978
978
979
979
** Default behavior per syntax/edition:**
980
980
@@ -991,7 +991,7 @@ files:
991
991
``` proto
992
992
edition = "2024";
993
993
994
- import "third_party/golang/protobuf/v2/src/ google/protobuf/go_features.proto";
994
+ import "google/protobuf/go_features.proto";
995
995
996
996
option features.(pb.go).strip_enum_prefix = STRIP_ENUM_PREFIX_STRIP;
997
997
@@ -1074,16 +1074,23 @@ The following shows the settings to replicate Edition 2023 behavior with Edition
1074
1074
2024 .
1075
1075
1076
1076
``` proto
1077
+ // foo/bar_baz.proto
1077
1078
edition = "2024";
1078
1079
1079
1080
import option "third_party/protobuf/cpp_features.proto";
1080
1081
import option "third_party/java/protobuf/java_features.proto";
1081
1082
1083
+ // If previously relying on edition 2023 default java_outer_classname.
1084
+ option java_outer_classname = "BarBaz" // or BarBazOuterClass
1085
+
1082
1086
option features.(pb.cpp).string_type = STRING;
1083
1087
option features.enforce_naming_style = STYLE_LEGACY;
1084
1088
option features.default_symbol_visibility = EXPORT_ALL;
1085
1089
option features.(pb.cpp).enum_name_uses_string_view = false;
1086
- option features.(pb.java).nest_in_file_class = LEGACY;
1090
+
1091
+ message MyMessage {
1092
+ option features.(pb.java).nest_in_file_class = YES;
1093
+ }
1087
1094
```
1088
1095
1089
1096
### Caveats and Exceptions {#caveats}
0 commit comments