Skip to content

Commit be0afc6

Browse files
editions features: document Go Protobuf api_level
The default for api_level changes to API_OPAQUE with edition 2024. To preserve the edition 2023 behavior, users need to explicitly set the api_level to API_OPEN. PiperOrigin-RevId: 808918518
1 parent 507f4ea commit be0afc6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

content/editions/features.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,6 +1079,7 @@ edition = "2024";
10791079
10801080
import option "third_party/protobuf/cpp_features.proto";
10811081
import option "third_party/java/protobuf/java_features.proto";
1082+
import option "third_party/golang/protobuf/v2/src/google/protobuf/go_features.proto";
10821083
10831084
// If previously relying on edition 2023 default java_outer_classname.
10841085
option java_outer_classname = "BarBaz" // or BarBazOuterClass
@@ -1087,6 +1088,7 @@ option features.(pb.cpp).string_type = STRING;
10871088
option features.enforce_naming_style = STYLE_LEGACY;
10881089
option features.default_symbol_visibility = EXPORT_ALL;
10891090
option features.(pb.cpp).enum_name_uses_string_view = false;
1091+
option features.(pb.go).api_level = API_OPEN;
10901092
10911093
message MyMessage {
10921094
option features.(pb.java).nest_in_file_class = YES;

0 commit comments

Comments
 (0)