Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions csharp/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ load("//upb/cmake:build_defs.bzl", "staleness_test")
conformance_test(
name = "conformance_test",
failure_list = "//conformance:failure_list_csharp.txt",
maximum_edition = "2023",
maximum_edition = "2024",
testee = "//conformance:conformance_csharp",
)

Expand Down Expand Up @@ -127,7 +127,7 @@ compile_edition_defaults(
srcs = [
"//:descriptor_proto",
],
maximum_edition = "2023",
maximum_edition = "2024",
minimum_edition = "PROTO2",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void MaxSupportedEdition()
// a new edition. It should only be changed when you're sure that all the features in the new
// edition are supported. Just changing the configuration for feature set default generation
// will *advertise* that we support the new edition, but that isn't sufficient.
Edition maxSupportedEdition = Edition._2023;
Edition maxSupportedEdition = Edition._2024;

// These lines should not need to be changed.
FeatureSetDescriptor.GetEditionDefaults(maxSupportedEdition);
Expand Down
2 changes: 1 addition & 1 deletion editions/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ compile_edition_defaults(
"//java/core:java_features_proto",
"//src/google/protobuf:cpp_features_proto",
],
maximum_edition = "2023",
maximum_edition = "2024",
minimum_edition = "2023",
)

Expand Down
35 changes: 34 additions & 1 deletion editions/defaults_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ TEST_F(OverridableDefaultsTest, Proto3) {
TEST_F(OverridableDefaultsTest, Edition2023) {
auto feature_defaults = ReadDefaults("protobuf_defaults");
ASSERT_OK(feature_defaults);
ASSERT_GE(feature_defaults->defaults().size(), 3);
ASSERT_GE(feature_defaults->defaults().size(), 4);
auto defaults = feature_defaults->defaults(2);
ASSERT_EQ(defaults.edition(), EDITION_2023);

Expand All @@ -248,6 +248,39 @@ TEST_F(OverridableDefaultsTest, Edition2023) {
)pb"));
}

// Lock down that 2024 overridable defaults never change. Once Edition 2024 has
// been released this test should never need to be touched.
TEST_F(OverridableDefaultsTest, Edition2024) {
auto feature_defaults = ReadDefaults("protobuf_defaults");
ASSERT_OK(feature_defaults);
ASSERT_GE(feature_defaults->defaults().size(), 4);
auto defaults = feature_defaults->defaults(3);
ASSERT_EQ(defaults.edition(), EDITION_2024);


EXPECT_THAT(defaults.overridable_features(), EqualsProto(R"pb(
field_presence: EXPLICIT
enum_type: OPEN
repeated_field_encoding: PACKED
utf8_validation: VERIFY
message_encoding: LENGTH_PREFIXED
json_format: ALLOW
enforce_naming_style: STYLE2024
default_symbol_visibility: EXPORT_TOP_LEVEL
[pb.cpp] {
legacy_closed_enum: false
string_type: VIEW
enum_name_uses_string_view: true
}
[pb.java] {
legacy_closed_enum: false
utf8_validation: DEFAULT
large_enum: false
nest_in_file_class: NO
}
)pb"));
}

} // namespace
} // namespace protobuf
} // namespace google
Expand Down
4 changes: 2 additions & 2 deletions java/core/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ compile_edition_defaults(
"//:descriptor_proto",
"//:java_features_proto",
],
maximum_edition = "2023",
maximum_edition = "2024",
minimum_edition = "PROTO2",
)

Expand Down Expand Up @@ -418,7 +418,7 @@ build_test(
conformance_test(
name = "conformance_test",
failure_list = "//conformance:failure_list_java.txt",
maximum_edition = "2023",
maximum_edition = "2024",
testee = "//conformance:conformance_java",
text_format_failure_list = "//conformance:text_format_failure_list_java.txt",
)
Expand Down
2 changes: 1 addition & 1 deletion upb/reflection/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ compile_edition_defaults(
srcs = [
"//:descriptor_proto",
],
maximum_edition = "2023",
maximum_edition = "2024",
minimum_edition = "PROTO2",
)

Expand Down
Loading