internal/testprotos/lazy: convert .proto files to editions

This will be useful in a follow-up change to reproduce a bug.

Change-Id: Ide5d174af24c054be75709b4ed77eb9956b411ec
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/727140
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Lasse Folger <lassefolger@google.com>
diff --git a/internal/testprotos/lazy/lazy_extension_normalized_wire_test.pb.go b/internal/testprotos/lazy/lazy_extension_normalized_wire_test.pb.go
index 9dc9fc1..7d74dcb 100644
--- a/internal/testprotos/lazy/lazy_extension_normalized_wire_test.pb.go
+++ b/internal/testprotos/lazy/lazy_extension_normalized_wire_test.pb.go
@@ -196,7 +196,7 @@
 	"\x05child\x18\x02 \x01(\v2(.lazy_extension_normalized_wire_test.SubR\x05child\"\x84\x01\n" +
 	"\x03Ext\x12\x1b\n" +
 	"\tsome_flag\x18\x01 \x01(\bR\bsomeFlag2`\n" +
-	"\x01b\x12(.lazy_extension_normalized_wire_test.Sub\x18\x02 \x01(\v2(.lazy_extension_normalized_wire_test.ExtR\x01bB5Z3google.golang.org/protobuf/internal/testprotos/lazy"
+	"\x01b\x12(.lazy_extension_normalized_wire_test.Sub\x18\x02 \x01(\v2(.lazy_extension_normalized_wire_test.ExtR\x01bB5Z3google.golang.org/protobuf/internal/testprotos/lazyb\beditionsp\xe8\a"
 
 var (
 	file_internal_testprotos_lazy_lazy_extension_normalized_wire_test_proto_rawDescOnce sync.Once
diff --git a/internal/testprotos/lazy/lazy_extension_normalized_wire_test.proto b/internal/testprotos/lazy/lazy_extension_normalized_wire_test.proto
index 3926fa9..b33913a 100644
--- a/internal/testprotos/lazy/lazy_extension_normalized_wire_test.proto
+++ b/internal/testprotos/lazy/lazy_extension_normalized_wire_test.proto
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-syntax = "proto2";
+edition = "2023";
 
 package lazy_extension_normalized_wire_test;
 
@@ -10,19 +10,19 @@
 
 message Sub {
   extensions 2 [verification = UNVERIFIED];
-  optional uint32 c = 3;
-  optional Sub grandchild = 4;
+  uint32 c = 3;
+  Sub grandchild = 4;
 }
 
 message Top {
-  optional uint32 a = 1;
-  optional Sub child = 2;
+  uint32 a = 1;
+  Sub child = 2;
 }
 
 message Ext {
   extend Sub {
-    optional Ext b = 2;
+    Ext b = 2;
   }
 
-  optional bool some_flag = 1;
+  bool some_flag = 1;
 }
diff --git a/internal/testprotos/lazy/lazy_extension_test.pb.go b/internal/testprotos/lazy/lazy_extension_test.pb.go
index fd416ce..f67870a 100644
--- a/internal/testprotos/lazy/lazy_extension_test.pb.go
+++ b/internal/testprotos/lazy/lazy_extension_test.pb.go
@@ -75,16 +75,6 @@
 	return protoreflect.EnumNumber(x)
 }
 
-// Deprecated: Do not use.
-func (x *FlyingFoxSpecies) UnmarshalJSON(b []byte) error {
-	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
-	if err != nil {
-		return err
-	}
-	*x = FlyingFoxSpecies(num)
-	return nil
-}
-
 // Deprecated: Use FlyingFoxSpecies.Descriptor instead.
 func (FlyingFoxSpecies) EnumDescriptor() ([]byte, []int) {
 	return file_internal_testprotos_lazy_lazy_extension_test_proto_rawDescGZIP(), []int{0}
@@ -143,16 +133,6 @@
 	return protoreflect.EnumNumber(x)
 }
 
-// Deprecated: Do not use.
-func (x *PipistrelleSpecies) UnmarshalJSON(b []byte) error {
-	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
-	if err != nil {
-		return err
-	}
-	*x = PipistrelleSpecies(num)
-	return nil
-}
-
 // Deprecated: Use PipistrelleSpecies.Descriptor instead.
 func (PipistrelleSpecies) EnumDescriptor() ([]byte, []int) {
 	return file_internal_testprotos_lazy_lazy_extension_test_proto_rawDescGZIP(), []int{1}
@@ -569,9 +549,9 @@
 	"\n" +
 	"2internal/testprotos/lazy/lazy_extension_test.proto\x12\x13lazy_extension_test\x1a=internal/testprotos/messageset/messagesetpb/message_set.proto\"B\n" +
 	"\x06Holder\x128\n" +
-	"\x04data\x18\x01 \x01(\v2$.goproto.proto.messageset.MessageSetR\x04data\"\x97\x01\n" +
-	"\x06Rabbit\x12\x12\n" +
-	"\x04name\x18\x01 \x01(\tR\x04name2y\n" +
+	"\x04data\x18\x01 \x01(\v2$.goproto.proto.messageset.MessageSetR\x04data\"\x9e\x01\n" +
+	"\x06Rabbit\x12\x19\n" +
+	"\x04name\x18\x01 \x01(\tB\x05\xaa\x01\x02 \x03R\x04name2y\n" +
 	"\x15message_set_extension\x12$.goproto.proto.messageset.MessageSet\x18\xa3\xfa\xe3\xa4\x01 \x01(\v2\x1b.lazy_extension_test.RabbitR\x13messageSetExtension\"L\n" +
 	"\tFlyingFox\x12?\n" +
 	"\aspecies\x18\x01 \x01(\x0e2%.lazy_extension_test.FlyingFoxSpeciesR\aspecies\"1\n" +
@@ -610,11 +590,9 @@
 	"\n" +
 	"binary_bat\x12\x19.lazy_extension_test.Tree\x18\xa6\xfa\xe3\xa4\x01 \x01(\fR\tbinaryBat:>\n" +
 	"\vinteger_bat\x12\x19.lazy_extension_test.Tree\x18\xa7\xfa\xe3\xa4\x01 \x01(\rR\n" +
-	"integerBat:a\n" +
-	"\vpipistrelle\x12\x19.lazy_extension_test.Tree\x18\xa8\xfa\xe3\xa4\x01 \x01(\n" +
-	"2 .lazy_extension_test.PipistrelleR\vpipistrelle:d\n" +
-	"\fpipistrelles\x12\x19.lazy_extension_test.Tree\x18\xa9\xfa\xe3\xa4\x01 \x03(\n" +
-	"2!.lazy_extension_test.PipistrellesR\fpipistrellesB5Z3google.golang.org/protobuf/internal/testprotos/lazy"
+	"integerBat:h\n" +
+	"\vpipistrelle\x12\x19.lazy_extension_test.Tree\x18\xa8\xfa\xe3\xa4\x01 \x01(\v2 .lazy_extension_test.PipistrelleB\x05\xaa\x01\x02(\x02R\vpipistrelle:k\n" +
+	"\fpipistrelles\x12\x19.lazy_extension_test.Tree\x18\xa9\xfa\xe3\xa4\x01 \x03(\v2!.lazy_extension_test.PipistrellesB\x05\xaa\x01\x02(\x02R\fpipistrellesB5Z3google.golang.org/protobuf/internal/testprotos/lazyb\beditionsp\xe8\a"
 
 var (
 	file_internal_testprotos_lazy_lazy_extension_test_proto_rawDescOnce sync.Once
diff --git a/internal/testprotos/lazy/lazy_extension_test.proto b/internal/testprotos/lazy/lazy_extension_test.proto
index 1d077da..54afc3a 100644
--- a/internal/testprotos/lazy/lazy_extension_test.proto
+++ b/internal/testprotos/lazy/lazy_extension_test.proto
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-syntax = "proto2";
+edition = "2023";
 
 package lazy_extension_test;
 
@@ -12,15 +12,15 @@
 
 // This message contains a message set.
 message Holder {
-  optional goproto.proto.messageset.MessageSet data = 1;
+  goproto.proto.messageset.MessageSet data = 1;
 }
 
 // This message may be inserted into a message set.
 message Rabbit {
   extend goproto.proto.messageset.MessageSet {
-    optional Rabbit message_set_extension = 345570595;
+    Rabbit message_set_extension = 345570595;
   }
-  optional string name = 1;
+  string name = 1 [features.utf8_validation = NONE];
 }
 
 enum FlyingFoxSpecies {
@@ -44,37 +44,42 @@
 }
 
 message FlyingFox {
-  optional FlyingFoxSpecies species = 1;
+  FlyingFoxSpecies species = 1;
 }
 
 message Tree {
-  optional bool eucalyptus = 1;
+  bool eucalyptus = 1;
   extensions 10000 to max;
 }
 
 extend Tree {
-  optional FlyingFox bat = 345570595;
+  FlyingFox bat = 345570595;
 }
 
 extend Tree {
-  optional FlyingFox bat_pup = 345570596;
+  FlyingFox bat_pup = 345570596;
+}
+
+message Pipistrelle {
+  PipistrelleSpecies species = 1;
+}
+
+message Pipistrelles {
+  PipistrelleSpecies species = 1;
 }
 
 extend Tree {
   repeated FlyingFox bat_posse = 345570597;
-  optional bytes binary_bat = 345570598;
-  optional uint32 integer_bat = 345570599;
-  optional group Pipistrelle = 345570600 {
-    optional PipistrelleSpecies species = 1;
-  }
-  repeated group Pipistrelles = 345570601 {
-    optional PipistrelleSpecies species = 1;
-  }
+  bytes binary_bat = 345570598;
+  uint32 integer_bat = 345570599;
+  Pipistrelle pipistrelle = 345570600 [features.message_encoding = DELIMITED];
+  repeated Pipistrelles pipistrelles = 345570601
+      [features.message_encoding = DELIMITED];
 }
 
 // And the ugly version that is not encouraged
 message BatNest {
   extend Tree {
-    optional FlyingFox bat = 345570602;
+    FlyingFox bat = 345570602;
   }
 }
diff --git a/internal/testprotos/lazy/lazy_normalized_wire_test.pb.go b/internal/testprotos/lazy/lazy_normalized_wire_test.pb.go
index 4dcbf8d..c556df1 100644
--- a/internal/testprotos/lazy/lazy_normalized_wire_test.pb.go
+++ b/internal/testprotos/lazy/lazy_normalized_wire_test.pb.go
@@ -140,7 +140,7 @@
 	"grandchild\"K\n" +
 	"\x04FTop\x12\f\n" +
 	"\x01a\x18\x01 \x01(\rR\x01a\x125\n" +
-	"\x05child\x18\x02 \x01(\v2\x1f.lazy_normalized_wire_test.FSubR\x05childB5Z3google.golang.org/protobuf/internal/testprotos/lazy"
+	"\x05child\x18\x02 \x01(\v2\x1f.lazy_normalized_wire_test.FSubR\x05childB5Z3google.golang.org/protobuf/internal/testprotos/lazyb\beditionsp\xe8\a"
 
 var (
 	file_internal_testprotos_lazy_lazy_normalized_wire_test_proto_rawDescOnce sync.Once
diff --git a/internal/testprotos/lazy/lazy_normalized_wire_test.proto b/internal/testprotos/lazy/lazy_normalized_wire_test.proto
index f335601..652fe6f 100644
--- a/internal/testprotos/lazy/lazy_normalized_wire_test.proto
+++ b/internal/testprotos/lazy/lazy_normalized_wire_test.proto
@@ -2,19 +2,19 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-syntax = "proto2";
+edition = "2023";
 
 package lazy_normalized_wire_test;
 
 option go_package = "google.golang.org/protobuf/internal/testprotos/lazy";
 
 message FSub {
-  optional uint32 b = 2;
-  optional uint32 c = 3;
-  optional FSub grandchild = 4 [lazy = true];
+  uint32 b = 2;
+  uint32 c = 3;
+  FSub grandchild = 4 [lazy = true];
 }
 
 message FTop {
-  optional uint32 a = 1;
-  optional FSub child = 2;
+  uint32 a = 1;
+  FSub child = 2;
 }