all: implement proto2/proto3 as editions [1/2]
This change removes most usages of Syntax() from the repository and uses
edition features for instead. The appropriate edition feature defaults are
loaded for proto2/proto3 when the initialization of the descriptors
start.
All of these changes were tested on the Google corpus.
Change-Id: Ieca076a2b38ca8e50e084cd32e725b7b3dcb4171
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/572435
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Stapelberg <stapelberg@google.com>
diff --git a/proto/noenforceutf8_test.go b/proto/noenforceutf8_test.go
index 2bd011e..e4b3ca3 100644
--- a/proto/noenforceutf8_test.go
+++ b/proto/noenforceutf8_test.go
@@ -134,8 +134,7 @@
}
md := fd.Messages().Get(0)
for i := 0; i < md.Fields().Len(); i++ {
- md.Fields().Get(i).(*filedesc.Field).L1.HasEnforceUTF8 = true
- md.Fields().Get(i).(*filedesc.Field).L1.EnforceUTF8 = false
+ md.Fields().Get(i).(*filedesc.Field).L1.EditionFeatures.IsUTF8Validated = false
}
return md
}(),