diff --git a/csharp/src/Google.Protobuf.Test/testprotos.pb b/csharp/src/Google.Protobuf.Test/testprotos.pb
index 9ecd4afc68..0f39b3822d 100644
Binary files a/csharp/src/Google.Protobuf.Test/testprotos.pb and b/csharp/src/Google.Protobuf.Test/testprotos.pb differ
diff --git a/csharp/src/Google.Protobuf/Reflection/Descriptor.pb.cs b/csharp/src/Google.Protobuf/Reflection/Descriptor.pb.cs
index 2b91751a18..a3b2dae49c 100644
--- a/csharp/src/Google.Protobuf/Reflection/Descriptor.pb.cs
+++ b/csharp/src/Google.Protobuf/Reflection/Descriptor.pb.cs
@@ -236,16 +236,17 @@ namespace Google.Protobuf.Reflection {
"Cgtzb3VyY2VfZmlsZRgCIAEoCRINCgViZWdpbhgDIAEoBRILCgNlbmQYBCAB",
"KAUSSAoIc2VtYW50aWMYBSABKA4yNi5nb29nbGUucHJvdG9idWYuR2VuZXJh",
"dGVkQ29kZUluZm8uQW5ub3RhdGlvbi5TZW1hbnRpYyIoCghTZW1hbnRpYxII",
- "CgROT05FEAASBwoDU0VUEAESCQoFQUxJQVMQAiqSAgoHRWRpdGlvbhITCg9F",
- "RElUSU9OX1VOS05PV04QABITCg5FRElUSU9OX1BST1RPMhDmBxITCg5FRElU",
- "SU9OX1BST1RPMxDnBxIRCgxFRElUSU9OXzIwMjMQ6AcSEQoMRURJVElPTl8y",
- "MDI0EOkHEhcKE0VESVRJT05fMV9URVNUX09OTFkQARIXChNFRElUSU9OXzJf",
- "VEVTVF9PTkxZEAISHQoXRURJVElPTl85OTk5N19URVNUX09OTFkQnY0GEh0K",
- "F0VESVRJT05fOTk5OThfVEVTVF9PTkxZEJ6NBhIdChdFRElUSU9OXzk5OTk5",
- "X1RFU1RfT05MWRCfjQYSEwoLRURJVElPTl9NQVgQ/////wdCfgoTY29tLmdv",
- "b2dsZS5wcm90b2J1ZkIQRGVzY3JpcHRvclByb3Rvc0gBWi1nb29nbGUuZ29s",
- "YW5nLm9yZy9wcm90b2J1Zi90eXBlcy9kZXNjcmlwdG9ycGL4AQGiAgNHUEKq",
- "AhpHb29nbGUuUHJvdG9idWYuUmVmbGVjdGlvbg=="));
+ "CgROT05FEAASBwoDU0VUEAESCQoFQUxJQVMQAiqnAgoHRWRpdGlvbhITCg9F",
+ "RElUSU9OX1VOS05PV04QABITCg5FRElUSU9OX0xFR0FDWRCEBxITCg5FRElU",
+ "SU9OX1BST1RPMhDmBxITCg5FRElUSU9OX1BST1RPMxDnBxIRCgxFRElUSU9O",
+ "XzIwMjMQ6AcSEQoMRURJVElPTl8yMDI0EOkHEhcKE0VESVRJT05fMV9URVNU",
+ "X09OTFkQARIXChNFRElUSU9OXzJfVEVTVF9PTkxZEAISHQoXRURJVElPTl85",
+ "OTk5N19URVNUX09OTFkQnY0GEh0KF0VESVRJT05fOTk5OThfVEVTVF9PTkxZ",
+ "EJ6NBhIdChdFRElUSU9OXzk5OTk5X1RFU1RfT05MWRCfjQYSEwoLRURJVElP",
+ "Tl9NQVgQ/////wdCfgoTY29tLmdvb2dsZS5wcm90b2J1ZkIQRGVzY3JpcHRv",
+ "clByb3Rvc0gBWi1nb29nbGUuZ29sYW5nLm9yZy9wcm90b2J1Zi90eXBlcy9k",
+ "ZXNjcmlwdG9ycGL4AQGiAgNHUEKqAhpHb29nbGUuUHJvdG9idWYuUmVmbGVj",
+ "dGlvbg=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.Reflection.Edition), }, null, new pbr::GeneratedClrTypeInfo[] {
@@ -289,6 +290,11 @@ namespace Google.Protobuf.Reflection {
///
[pbr::OriginalName("EDITION_UNKNOWN")] Unknown = 0,
///
+ /// A placeholder edition for specifying default behaviors *before* a feature
+ /// was first introduced. This is effectively an "infinite past".
+ ///
+ [pbr::OriginalName("EDITION_LEGACY")] Legacy = 900,
+ ///
/// Legacy syntax "editions". These pre-date editions, but behave much like
/// distinct editions. These can't be used to specify the edition of proto
/// files, but feature definitions must supply proto2/proto3 defaults for
diff --git a/php/ext/google/protobuf/php-upb.c b/php/ext/google/protobuf/php-upb.c
index 142344cf5a..88f11bc2bd 100644
--- a/php/ext/google/protobuf/php-upb.c
+++ b/php/ext/google/protobuf/php-upb.c
@@ -1569,10 +1569,11 @@ static const upb_MiniTable *messages_layout[33] = {
const upb_MiniTableEnum google_protobuf_Edition_enum_init = {
64,
- 8,
+ 9,
{
0x7,
0x0,
+ 0x384,
0x3e6,
0x3e7,
0x3e8,
@@ -1766,7 +1767,7 @@ const upb_MiniTableFile google_protobuf_descriptor_proto_upb_file_layout = {
* regenerated. */
-static const char descriptor[12154] = {'\n', ' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'e', 's', 'c', 'r', 'i', 'p',
+static const char descriptor[12175] = {'\n', ' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'e', 's', 'c', 'r', 'i', 'p',
't', 'o', 'r', '.', 'p', 'r', 'o', 't', 'o', '\022', '\017', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u',
'f', '\"', 'M', '\n', '\021', 'F', 'i', 'l', 'e', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'S', 'e', 't', '\022', '8', '\n',
'\004', 'f', 'i', 'l', 'e', '\030', '\001', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't',
@@ -2236,23 +2237,23 @@ static const char descriptor[12154] = {'\n', ' ', 'g', 'o', 'o', 'g', 'l', 'e',
'f', 'o', '.', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', '.', 'S', 'e', 'm', 'a', 'n', 't', 'i', 'c', 'R', '\010', 's',
'e', 'm', 'a', 'n', 't', 'i', 'c', '\"', '(', '\n', '\010', 'S', 'e', 'm', 'a', 'n', 't', 'i', 'c', '\022', '\010', '\n', '\004', 'N', 'O',
'N', 'E', '\020', '\000', '\022', '\007', '\n', '\003', 'S', 'E', 'T', '\020', '\001', '\022', '\t', '\n', '\005', 'A', 'L', 'I', 'A', 'S', '\020', '\002', '*',
-'\222', '\002', '\n', '\007', 'E', 'd', 'i', 't', 'i', 'o', 'n', '\022', '\023', '\n', '\017', 'E', 'D', 'I', 'T', 'I', 'O', 'N', '_', 'U', 'N',
-'K', 'N', 'O', 'W', 'N', '\020', '\000', '\022', '\023', '\n', '\016', 'E', 'D', 'I', 'T', 'I', 'O', 'N', '_', 'P', 'R', 'O', 'T', 'O', '2',
-'\020', '\346', '\007', '\022', '\023', '\n', '\016', 'E', 'D', 'I', 'T', 'I', 'O', 'N', '_', 'P', 'R', 'O', 'T', 'O', '3', '\020', '\347', '\007', '\022',
-'\021', '\n', '\014', 'E', 'D', 'I', 'T', 'I', 'O', 'N', '_', '2', '0', '2', '3', '\020', '\350', '\007', '\022', '\021', '\n', '\014', 'E', 'D', 'I',
-'T', 'I', 'O', 'N', '_', '2', '0', '2', '4', '\020', '\351', '\007', '\022', '\027', '\n', '\023', 'E', 'D', 'I', 'T', 'I', 'O', 'N', '_', '1',
-'_', 'T', 'E', 'S', 'T', '_', 'O', 'N', 'L', 'Y', '\020', '\001', '\022', '\027', '\n', '\023', 'E', 'D', 'I', 'T', 'I', 'O', 'N', '_', '2',
-'_', 'T', 'E', 'S', 'T', '_', 'O', 'N', 'L', 'Y', '\020', '\002', '\022', '\035', '\n', '\027', 'E', 'D', 'I', 'T', 'I', 'O', 'N', '_', '9',
-'9', '9', '9', '7', '_', 'T', 'E', 'S', 'T', '_', 'O', 'N', 'L', 'Y', '\020', '\235', '\215', '\006', '\022', '\035', '\n', '\027', 'E', 'D', 'I',
-'T', 'I', 'O', 'N', '_', '9', '9', '9', '9', '8', '_', 'T', 'E', 'S', 'T', '_', 'O', 'N', 'L', 'Y', '\020', '\236', '\215', '\006', '\022',
-'\035', '\n', '\027', 'E', 'D', 'I', 'T', 'I', 'O', 'N', '_', '9', '9', '9', '9', '9', '_', 'T', 'E', 'S', 'T', '_', 'O', 'N', 'L',
-'Y', '\020', '\237', '\215', '\006', '\022', '\023', '\n', '\013', 'E', 'D', 'I', 'T', 'I', 'O', 'N', '_', 'M', 'A', 'X', '\020', '\377', '\377', '\377', '\377',
-'\007', 'B', '~', '\n', '\023', 'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', 'B',
-'\020', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 's', 'H', '\001', 'Z', '-', 'g', 'o', 'o', 'g',
-'l', 'e', '.', 'g', 'o', 'l', 'a', 'n', 'g', '.', 'o', 'r', 'g', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'y',
-'p', 'e', 's', '/', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'p', 'b', '\370', '\001', '\001', '\242', '\002', '\003', 'G', 'P', 'B',
-'\252', '\002', '\032', 'G', 'o', 'o', 'g', 'l', 'e', '.', 'P', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'R', 'e', 'f', 'l', 'e', 'c',
-'t', 'i', 'o', 'n',
+'\247', '\002', '\n', '\007', 'E', 'd', 'i', 't', 'i', 'o', 'n', '\022', '\023', '\n', '\017', 'E', 'D', 'I', 'T', 'I', 'O', 'N', '_', 'U', 'N',
+'K', 'N', 'O', 'W', 'N', '\020', '\000', '\022', '\023', '\n', '\016', 'E', 'D', 'I', 'T', 'I', 'O', 'N', '_', 'L', 'E', 'G', 'A', 'C', 'Y',
+'\020', '\204', '\007', '\022', '\023', '\n', '\016', 'E', 'D', 'I', 'T', 'I', 'O', 'N', '_', 'P', 'R', 'O', 'T', 'O', '2', '\020', '\346', '\007', '\022',
+'\023', '\n', '\016', 'E', 'D', 'I', 'T', 'I', 'O', 'N', '_', 'P', 'R', 'O', 'T', 'O', '3', '\020', '\347', '\007', '\022', '\021', '\n', '\014', 'E',
+'D', 'I', 'T', 'I', 'O', 'N', '_', '2', '0', '2', '3', '\020', '\350', '\007', '\022', '\021', '\n', '\014', 'E', 'D', 'I', 'T', 'I', 'O', 'N',
+'_', '2', '0', '2', '4', '\020', '\351', '\007', '\022', '\027', '\n', '\023', 'E', 'D', 'I', 'T', 'I', 'O', 'N', '_', '1', '_', 'T', 'E', 'S',
+'T', '_', 'O', 'N', 'L', 'Y', '\020', '\001', '\022', '\027', '\n', '\023', 'E', 'D', 'I', 'T', 'I', 'O', 'N', '_', '2', '_', 'T', 'E', 'S',
+'T', '_', 'O', 'N', 'L', 'Y', '\020', '\002', '\022', '\035', '\n', '\027', 'E', 'D', 'I', 'T', 'I', 'O', 'N', '_', '9', '9', '9', '9', '7',
+'_', 'T', 'E', 'S', 'T', '_', 'O', 'N', 'L', 'Y', '\020', '\235', '\215', '\006', '\022', '\035', '\n', '\027', 'E', 'D', 'I', 'T', 'I', 'O', 'N',
+'_', '9', '9', '9', '9', '8', '_', 'T', 'E', 'S', 'T', '_', 'O', 'N', 'L', 'Y', '\020', '\236', '\215', '\006', '\022', '\035', '\n', '\027', 'E',
+'D', 'I', 'T', 'I', 'O', 'N', '_', '9', '9', '9', '9', '9', '_', 'T', 'E', 'S', 'T', '_', 'O', 'N', 'L', 'Y', '\020', '\237', '\215',
+'\006', '\022', '\023', '\n', '\013', 'E', 'D', 'I', 'T', 'I', 'O', 'N', '_', 'M', 'A', 'X', '\020', '\377', '\377', '\377', '\377', '\007', 'B', '~', '\n',
+'\023', 'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', 'B', '\020', 'D', 'e', 's',
+'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 's', 'H', '\001', 'Z', '-', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g',
+'o', 'l', 'a', 'n', 'g', '.', 'o', 'r', 'g', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'y', 'p', 'e', 's', '/',
+'d', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'p', 'b', '\370', '\001', '\001', '\242', '\002', '\003', 'G', 'P', 'B', '\252', '\002', '\032', 'G',
+'o', 'o', 'g', 'l', 'e', '.', 'P', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'R', 'e', 'f', 'l', 'e', 'c', 't', 'i', 'o', 'n',
};
static _upb_DefPool_Init *deps[1] = {
@@ -2263,7 +2264,7 @@ _upb_DefPool_Init google_protobuf_descriptor_proto_upbdefinit = {
deps,
&google_protobuf_descriptor_proto_upb_file_layout,
"google/protobuf/descriptor.proto",
- UPB_STRINGVIEW_INIT(descriptor, 12154)
+ UPB_STRINGVIEW_INIT(descriptor, 12175)
};
diff --git a/php/ext/google/protobuf/php-upb.h b/php/ext/google/protobuf/php-upb.h
index 74a77ba658..820add1527 100644
--- a/php/ext/google/protobuf/php-upb.h
+++ b/php/ext/google/protobuf/php-upb.h
@@ -4545,6 +4545,7 @@ typedef enum {
google_protobuf_EDITION_UNKNOWN = 0,
google_protobuf_EDITION_1_TEST_ONLY = 1,
google_protobuf_EDITION_2_TEST_ONLY = 2,
+ google_protobuf_EDITION_LEGACY = 900,
google_protobuf_EDITION_PROTO2 = 998,
google_protobuf_EDITION_PROTO3 = 999,
google_protobuf_EDITION_2023 = 1000,
diff --git a/ruby/ext/google/protobuf_c/ruby-upb.c b/ruby/ext/google/protobuf_c/ruby-upb.c
index a34b081ef8..626d988fdb 100644
--- a/ruby/ext/google/protobuf_c/ruby-upb.c
+++ b/ruby/ext/google/protobuf_c/ruby-upb.c
@@ -1569,10 +1569,11 @@ static const upb_MiniTable *messages_layout[33] = {
const upb_MiniTableEnum google_protobuf_Edition_enum_init = {
64,
- 8,
+ 9,
{
0x7,
0x0,
+ 0x384,
0x3e6,
0x3e7,
0x3e8,
diff --git a/ruby/ext/google/protobuf_c/ruby-upb.h b/ruby/ext/google/protobuf_c/ruby-upb.h
index 06bf3a9865..60196a0637 100755
--- a/ruby/ext/google/protobuf_c/ruby-upb.h
+++ b/ruby/ext/google/protobuf_c/ruby-upb.h
@@ -4947,6 +4947,7 @@ typedef enum {
google_protobuf_EDITION_UNKNOWN = 0,
google_protobuf_EDITION_1_TEST_ONLY = 1,
google_protobuf_EDITION_2_TEST_ONLY = 2,
+ google_protobuf_EDITION_LEGACY = 900,
google_protobuf_EDITION_PROTO2 = 998,
google_protobuf_EDITION_PROTO3 = 999,
google_protobuf_EDITION_2023 = 1000,
diff --git a/upb/cmake/google/protobuf/descriptor.upb.h b/upb/cmake/google/protobuf/descriptor.upb.h
index 8cbca671de..81d1d3d96f 100644
--- a/upb/cmake/google/protobuf/descriptor.upb.h
+++ b/upb/cmake/google/protobuf/descriptor.upb.h
@@ -57,6 +57,7 @@ typedef enum {
google_protobuf_EDITION_UNKNOWN = 0,
google_protobuf_EDITION_1_TEST_ONLY = 1,
google_protobuf_EDITION_2_TEST_ONLY = 2,
+ google_protobuf_EDITION_LEGACY = 900,
google_protobuf_EDITION_PROTO2 = 998,
google_protobuf_EDITION_PROTO3 = 999,
google_protobuf_EDITION_2023 = 1000,
diff --git a/upb/cmake/google/protobuf/descriptor.upb_minitable.c b/upb/cmake/google/protobuf/descriptor.upb_minitable.c
index d09c175145..1cc463de95 100644
--- a/upb/cmake/google/protobuf/descriptor.upb_minitable.c
+++ b/upb/cmake/google/protobuf/descriptor.upb_minitable.c
@@ -1171,10 +1171,11 @@ static const upb_MiniTable *messages_layout[33] = {
const upb_MiniTableEnum google_protobuf_Edition_enum_init = {
64,
- 8,
+ 9,
{
0x7,
0x0,
+ 0x384,
0x3e6,
0x3e7,
0x3e8,
diff --git a/upb/reflection/cmake/google/protobuf/descriptor.upb.h b/upb/reflection/cmake/google/protobuf/descriptor.upb.h
index 8cbca671de..81d1d3d96f 100644
--- a/upb/reflection/cmake/google/protobuf/descriptor.upb.h
+++ b/upb/reflection/cmake/google/protobuf/descriptor.upb.h
@@ -57,6 +57,7 @@ typedef enum {
google_protobuf_EDITION_UNKNOWN = 0,
google_protobuf_EDITION_1_TEST_ONLY = 1,
google_protobuf_EDITION_2_TEST_ONLY = 2,
+ google_protobuf_EDITION_LEGACY = 900,
google_protobuf_EDITION_PROTO2 = 998,
google_protobuf_EDITION_PROTO3 = 999,
google_protobuf_EDITION_2023 = 1000,
diff --git a/upb/reflection/cmake/google/protobuf/descriptor.upb_minitable.c b/upb/reflection/cmake/google/protobuf/descriptor.upb_minitable.c
index d09c175145..1cc463de95 100644
--- a/upb/reflection/cmake/google/protobuf/descriptor.upb_minitable.c
+++ b/upb/reflection/cmake/google/protobuf/descriptor.upb_minitable.c
@@ -1171,10 +1171,11 @@ static const upb_MiniTable *messages_layout[33] = {
const upb_MiniTableEnum google_protobuf_Edition_enum_init = {
64,
- 8,
+ 9,
{
0x7,
0x0,
+ 0x384,
0x3e6,
0x3e7,
0x3e8,