Skip to content

Commit 6216ae4

Browse files
authored
Update our compiled_edition_default's maximum_edition to 2024 (#22870)
PiperOrigin-RevId: 788981870
1 parent 6f6012a commit 6216ae4

File tree

11 files changed

+46
-13
lines changed

11 files changed

+46
-13
lines changed

csharp/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ load("//upb/cmake:build_defs.bzl", "staleness_test")
1616
conformance_test(
1717
name = "conformance_test",
1818
failure_list = "//conformance:failure_list_csharp.txt",
19-
maximum_edition = "2023",
19+
maximum_edition = "2024",
2020
testee = "//conformance:conformance_csharp",
2121
)
2222

@@ -127,7 +127,7 @@ compile_edition_defaults(
127127
srcs = [
128128
"//:descriptor_proto",
129129
],
130-
maximum_edition = "2023",
130+
maximum_edition = "2024",
131131
minimum_edition = "PROTO2",
132132
)
133133

csharp/src/Google.Protobuf.Test/Reflection/FeatureSetDescriptorTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void MaxSupportedEdition()
5656
// a new edition. It should only be changed when you're sure that all the features in the new
5757
// edition are supported. Just changing the configuration for feature set default generation
5858
// will *advertise* that we support the new edition, but that isn't sufficient.
59-
Edition maxSupportedEdition = Edition._2023;
59+
Edition maxSupportedEdition = Edition._2024;
6060

6161
// These lines should not need to be changed.
6262
FeatureSetDescriptor.GetEditionDefaults(maxSupportedEdition);

csharp/src/Google.Protobuf/Reflection/FeatureSetDescriptor.g.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ internal sealed partial class FeatureSetDescriptor
1313
{
1414
// Canonical serialized form of the edition defaults, generated by embed_edition_defaults.
1515
private const string DefaultsBase64 =
16-
"ChcYhAciACoQCAEQAhgCIAMoATACOAJAAQoXGOcHIgAqEAgCEAEYASACKAEwATgCQAEKFxjoByIMCAEQARgBIAIoATABKgQ4AkABIOYHKOgH";
16+
"ChcYhAciACoQCAEQAhgCIAMoATACOAJAAQoXGOcHIgAqEAgCEAEYASACKAEwATgCQAEKFxjoByIMCAEQARgBIAIoATABKgQ4AkABChcY6QciEAgBEAEYASACKAEwATgBQAIqACDmByjpBw==";
1717
}

editions/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ compile_edition_defaults(
2727
"//java/core:java_features_proto",
2828
"//src/google/protobuf:cpp_features_proto",
2929
],
30-
maximum_edition = "2023",
30+
maximum_edition = "2024",
3131
minimum_edition = "2023",
3232
)
3333

editions/defaults_test.cc

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ TEST_F(OverridableDefaultsTest, Proto3) {
231231
TEST_F(OverridableDefaultsTest, Edition2023) {
232232
auto feature_defaults = ReadDefaults("protobuf_defaults");
233233
ASSERT_OK(feature_defaults);
234-
ASSERT_GE(feature_defaults->defaults().size(), 3);
234+
ASSERT_GE(feature_defaults->defaults().size(), 4);
235235
auto defaults = feature_defaults->defaults(2);
236236
ASSERT_EQ(defaults.edition(), EDITION_2023);
237237

@@ -248,6 +248,39 @@ TEST_F(OverridableDefaultsTest, Edition2023) {
248248
)pb"));
249249
}
250250

251+
// Lock down that 2024 overridable defaults never change. Once Edition 2024 has
252+
// been released this test should never need to be touched.
253+
TEST_F(OverridableDefaultsTest, Edition2024) {
254+
auto feature_defaults = ReadDefaults("protobuf_defaults");
255+
ASSERT_OK(feature_defaults);
256+
ASSERT_GE(feature_defaults->defaults().size(), 4);
257+
auto defaults = feature_defaults->defaults(3);
258+
ASSERT_EQ(defaults.edition(), EDITION_2024);
259+
260+
261+
EXPECT_THAT(defaults.overridable_features(), EqualsProto(R"pb(
262+
field_presence: EXPLICIT
263+
enum_type: OPEN
264+
repeated_field_encoding: PACKED
265+
utf8_validation: VERIFY
266+
message_encoding: LENGTH_PREFIXED
267+
json_format: ALLOW
268+
enforce_naming_style: STYLE2024
269+
default_symbol_visibility: EXPORT_TOP_LEVEL
270+
[pb.cpp] {
271+
legacy_closed_enum: false
272+
string_type: VIEW
273+
enum_name_uses_string_view: true
274+
}
275+
[pb.java] {
276+
legacy_closed_enum: false
277+
utf8_validation: DEFAULT
278+
large_enum: false
279+
nest_in_file_class: NO
280+
}
281+
)pb"));
282+
}
283+
251284
} // namespace
252285
} // namespace protobuf
253286
} // namespace google

java/core/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ compile_edition_defaults(
222222
"//:descriptor_proto",
223223
"//:java_features_proto",
224224
],
225-
maximum_edition = "2023",
225+
maximum_edition = "2024",
226226
minimum_edition = "PROTO2",
227227
)
228228

@@ -418,7 +418,7 @@ build_test(
418418
conformance_test(
419419
name = "conformance_test",
420420
failure_list = "//conformance:failure_list_java.txt",
421-
maximum_edition = "2023",
421+
maximum_edition = "2024",
422422
testee = "//conformance:conformance_java",
423423
text_format_failure_list = "//conformance:text_format_failure_list_java.txt",
424424
)

java/core/src/main/java/com/google/protobuf/JavaEditionDefaults.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
package com.google.protobuf;
55

66
public final class JavaEditionDefaults {
7-
public static final String PROTOBUF_INTERNAL_JAVA_EDITION_DEFAULTS = "\n\'\030\204\007\"\003\312>\000*\035\010\001\020\002\030\002 \003(\0010\0028\002@\001\312>\n\010\001\020\001\030\000 \001(\003\n\'\030\347\007\"\003\312>\000*\035\010\002\020\001\030\001 \002(\0010\0018\002@\001\312>\n\010\000\020\001\030\000 \001(\003\n\'\030\350\007\"\023\010\001\020\001\030\001 \002(\0010\001\312>\004\010\000\020\001*\r8\002@\001\312>\006\030\000 \001(\003 \346\007(\350\007";
7+
public static final String PROTOBUF_INTERNAL_JAVA_EDITION_DEFAULTS = "\n\'\030\204\007\"\003\312>\000*\035\010\001\020\002\030\002 \003(\0010\0028\002@\001\312>\n\010\001\020\001\030\000 \001(\003\n\'\030\347\007\"\003\312>\000*\035\010\002\020\001\030\001 \002(\0010\0018\002@\001\312>\n\010\000\020\001\030\000 \001(\003\n\'\030\350\007\"\023\010\001\020\001\030\001 \002(\0010\001\312>\004\010\000\020\001*\r8\002@\001\312>\006\030\000 \001(\003\n\'\030\351\007\"\033\010\001\020\001\030\001 \002(\0010\0018\001@\002\312>\010\010\000\020\001\030\000(\001*\005\312>\002 \000 \346\007(\351\007";
88

99
private JavaEditionDefaults() {}
1010
}

php/ext/google/protobuf/php-upb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16225,7 +16225,7 @@ upb_ServiceDef* _upb_ServiceDefs_New(upb_DefBuilder* ctx, int n,
1622516225
// features. This is used for feature resolution under Editions.
1622616226
// NOLINTBEGIN
1622716227
// clang-format off
16228-
#define UPB_INTERNAL_UPB_EDITION_DEFAULTS "\n\027\030\204\007\"\000*\020\010\001\020\002\030\002 \003(\0010\0028\002@\001\n\027\030\347\007\"\000*\020\010\002\020\001\030\001 \002(\0010\0018\002@\001\n\027\030\350\007\"\014\010\001\020\001\030\001 \002(\0010\001*\0048\002@\001 \346\007(\350\007"
16228+
#define UPB_INTERNAL_UPB_EDITION_DEFAULTS "\n\027\030\204\007\"\000*\020\010\001\020\002\030\002 \003(\0010\0028\002@\001\n\027\030\347\007\"\000*\020\010\002\020\001\030\001 \002(\0010\0018\002@\001\n\027\030\350\007\"\014\010\001\020\001\030\001 \002(\0010\001*\0048\002@\001\n\027\030\351\007\"\020\010\001\020\001\030\001 \002(\0010\0018\001@\002*\000 \346\007(\351\007"
1622916229
// clang-format on
1623016230
// NOLINTEND
1623116231

ruby/ext/google/protobuf_c/ruby-upb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16029,7 +16029,7 @@ upb_ServiceDef* _upb_ServiceDefs_New(upb_DefBuilder* ctx, int n,
1602916029
// features. This is used for feature resolution under Editions.
1603016030
// NOLINTBEGIN
1603116031
// clang-format off
16032-
#define UPB_INTERNAL_UPB_EDITION_DEFAULTS "\n\027\030\204\007\"\000*\020\010\001\020\002\030\002 \003(\0010\0028\002@\001\n\027\030\347\007\"\000*\020\010\002\020\001\030\001 \002(\0010\0018\002@\001\n\027\030\350\007\"\014\010\001\020\001\030\001 \002(\0010\001*\0048\002@\001 \346\007(\350\007"
16032+
#define UPB_INTERNAL_UPB_EDITION_DEFAULTS "\n\027\030\204\007\"\000*\020\010\001\020\002\030\002 \003(\0010\0028\002@\001\n\027\030\347\007\"\000*\020\010\002\020\001\030\001 \002(\0010\0018\002@\001\n\027\030\350\007\"\014\010\001\020\001\030\001 \002(\0010\001*\0048\002@\001\n\027\030\351\007\"\020\010\001\020\001\030\001 \002(\0010\0018\001@\002*\000 \346\007(\351\007"
1603316033
// clang-format on
1603416034
// NOLINTEND
1603516035

upb/reflection/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ compile_edition_defaults(
183183
srcs = [
184184
"//:descriptor_proto",
185185
],
186-
maximum_edition = "2023",
186+
maximum_edition = "2024",
187187
minimum_edition = "PROTO2",
188188
)
189189

0 commit comments

Comments
 (0)