Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ internal sealed partial class FeatureSetDescriptor
{
// Canonical serialized form of the edition defaults, generated by embed_edition_defaults.
private const string DefaultsBase64 =
"ChcYhAciACoQCAEQAhgCIAMoATACOAJAAQoXGOcHIgAqEAgCEAEYASACKAEwATgCQAEKFxjoByIMCAEQARgBIAIoATABKgQ4AkABIOYHKOgH";
"ChcYhAciACoQCAEQAhgCIAMoATACOAJAAQoXGOcHIgAqEAgCEAEYASACKAEwATgCQAEKFxjoByIMCAEQARgBIAIoATABKgQ4AkABChcY6QciEAgBEAEYASACKAEwATgBQAIqACDmByjpBw==";
}
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package com.google.protobuf;

public final class JavaEditionDefaults {
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";
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";

private JavaEditionDefaults() {}
}
2 changes: 1 addition & 1 deletion php/ext/google/protobuf/php-upb.h
Original file line number Diff line number Diff line change
Expand Up @@ -16225,7 +16225,7 @@ upb_ServiceDef* _upb_ServiceDefs_New(upb_DefBuilder* ctx, int n,
// features. This is used for feature resolution under Editions.
// NOLINTBEGIN
// clang-format off
#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"
#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"
// clang-format on
// NOLINTEND

Expand Down
2 changes: 1 addition & 1 deletion ruby/ext/google/protobuf_c/ruby-upb.h
Original file line number Diff line number Diff line change
Expand Up @@ -16029,7 +16029,7 @@ upb_ServiceDef* _upb_ServiceDefs_New(upb_DefBuilder* ctx, int n,
// features. This is used for feature resolution under Editions.
// NOLINTBEGIN
// clang-format off
#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"
#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"
// clang-format on
// NOLINTEND

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
2 changes: 1 addition & 1 deletion upb/reflection/internal/upb_edition_defaults.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// features. This is used for feature resolution under Editions.
// NOLINTBEGIN
// clang-format off
#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"
#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"
// clang-format on
// NOLINTEND

Expand Down
Loading