internal/impl: rename MessageType as MessageInfo
The name MessageType is easily confused with protoreflect.MessageType.
Rename it as MessageInfo, which follows the pattern set by v1,
where the equivalent data structure is called InternalMessageInfo.
Change-Id: I535956e1f7c6e9b07e9585e889d5e93388d0d2ce
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/178478
Reviewed-by: Damien Neil <dneil@google.com>
diff --git a/internal/fileinit/desc.go b/internal/fileinit/desc.go
index 0804bf8..4a0861b 100644
--- a/internal/fileinit/desc.go
+++ b/internal/fileinit/desc.go
@@ -111,7 +111,7 @@
// MessageOutputTypes is where Init stores all initialized message types
// in "flattened ordering". This includes slots for map entry messages,
// which are skipped over.
- MessageOutputTypes []pimpl.MessageType
+ MessageOutputTypes []pimpl.MessageInfo
// ExtensionOutputTypes is where Init stores all initialized extension types
// in "flattened ordering".
ExtensionOutputTypes []pref.ExtensionType
diff --git a/internal/impl/codec_extension.go b/internal/impl/codec_extension.go
index b92932d..714dec7 100644
--- a/internal/impl/codec_extension.go
+++ b/internal/impl/codec_extension.go
@@ -15,7 +15,7 @@
funcs ifaceCoderFuncs
}
-func (mi *MessageType) extensionFieldInfo(desc *piface.ExtensionDescV1) *extensionFieldInfo {
+func (mi *MessageInfo) extensionFieldInfo(desc *piface.ExtensionDescV1) *extensionFieldInfo {
// As of this time (Go 1.12, linux/amd64), an RWMutex benchmarks as faster
// than a sync.Map.
mi.extensionFieldInfosMu.RLock()
diff --git a/internal/impl/encode.go b/internal/impl/encode.go
index c0fce6c..e3ba7cf 100644
--- a/internal/impl/encode.go
+++ b/internal/impl/encode.go
@@ -49,11 +49,11 @@
func (o marshalOptions) UseCachedSize() bool { return o&marshalUseCachedSize != 0 }
// size is protoreflect.Methods.Size.
-func (mi *MessageType) size(msg pref.ProtoMessage) (size int) {
+func (mi *MessageInfo) size(msg pref.ProtoMessage) (size int) {
return mi.sizePointer(pointerOfIface(msg), 0)
}
-func (mi *MessageType) sizePointer(p pointer, opts marshalOptions) (size int) {
+func (mi *MessageInfo) sizePointer(p pointer, opts marshalOptions) (size int) {
mi.init()
if p.IsNil() {
return 0
@@ -64,7 +64,7 @@
return mi.sizePointerSlow(p, opts)
}
-func (mi *MessageType) sizePointerSlow(p pointer, opts marshalOptions) (size int) {
+func (mi *MessageInfo) sizePointerSlow(p pointer, opts marshalOptions) (size int) {
if mi.extensionOffset.IsValid() {
e := p.Apply(mi.extensionOffset).Extensions()
size += mi.sizeExtensions(e, opts)
@@ -90,11 +90,11 @@
}
// marshalAppend is protoreflect.Methods.MarshalAppend.
-func (mi *MessageType) marshalAppend(b []byte, msg pref.ProtoMessage, opts piface.MarshalOptions) ([]byte, error) {
+func (mi *MessageInfo) marshalAppend(b []byte, msg pref.ProtoMessage, opts piface.MarshalOptions) ([]byte, error) {
return mi.marshalAppendPointer(b, pointerOfIface(msg), newMarshalOptions(opts))
}
-func (mi *MessageType) marshalAppendPointer(b []byte, p pointer, opts marshalOptions) ([]byte, error) {
+func (mi *MessageInfo) marshalAppendPointer(b []byte, p pointer, opts marshalOptions) ([]byte, error) {
mi.init()
if p.IsNil() {
return b, nil
@@ -130,7 +130,7 @@
return b, nerr.E
}
-func (mi *MessageType) sizeExtensions(ext *legacyExtensionMap, opts marshalOptions) (n int) {
+func (mi *MessageInfo) sizeExtensions(ext *legacyExtensionMap, opts marshalOptions) (n int) {
if ext == nil {
return 0
}
@@ -144,7 +144,7 @@
return n
}
-func (mi *MessageType) appendExtensions(b []byte, ext *legacyExtensionMap, opts marshalOptions) ([]byte, error) {
+func (mi *MessageInfo) appendExtensions(b []byte, ext *legacyExtensionMap, opts marshalOptions) ([]byte, error) {
if ext == nil {
return b, nil
}
diff --git a/internal/impl/encode_field.go b/internal/impl/encode_field.go
index 6dbbed1..2e4884d 100644
--- a/internal/impl/encode_field.go
+++ b/internal/impl/encode_field.go
@@ -70,13 +70,13 @@
}
func makeMessageFieldCoder(fd pref.FieldDescriptor, ft reflect.Type) pointerCoderFuncs {
- if fi, ok := getMessageType(ft); ok {
+ if fi, ok := getMessageInfo(ft); ok {
return pointerCoderFuncs{
size: func(p pointer, tagsize int, opts marshalOptions) int {
- return sizeMessageType(p, fi, tagsize, opts)
+ return sizeMessageInfo(p, fi, tagsize, opts)
},
marshal: func(b []byte, p pointer, wiretag uint64, opts marshalOptions) ([]byte, error) {
- return appendMessageType(b, p, wiretag, fi, opts)
+ return appendMessageInfo(b, p, wiretag, fi, opts)
},
}
} else {
@@ -93,11 +93,11 @@
}
}
-func sizeMessageType(p pointer, mi *MessageType, tagsize int, opts marshalOptions) int {
+func sizeMessageInfo(p pointer, mi *MessageInfo, tagsize int, opts marshalOptions) int {
return wire.SizeBytes(mi.sizePointer(p.Elem(), opts)) + tagsize
}
-func appendMessageType(b []byte, p pointer, wiretag uint64, mi *MessageType, opts marshalOptions) ([]byte, error) {
+func appendMessageInfo(b []byte, p pointer, wiretag uint64, mi *MessageInfo, opts marshalOptions) ([]byte, error) {
b = wire.AppendVarint(b, wiretag)
b = wire.AppendVarint(b, uint64(mi.sizePointer(p.Elem(), opts)))
return mi.marshalAppendPointer(b, p.Elem(), opts)
@@ -129,7 +129,7 @@
}
func makeGroupFieldCoder(fd pref.FieldDescriptor, ft reflect.Type) pointerCoderFuncs {
- if fi, ok := getMessageType(ft); ok {
+ if fi, ok := getMessageInfo(ft); ok {
return pointerCoderFuncs{
size: func(p pointer, tagsize int, opts marshalOptions) int {
return sizeGroupType(p, fi, tagsize, opts)
@@ -152,11 +152,11 @@
}
}
-func sizeGroupType(p pointer, mi *MessageType, tagsize int, opts marshalOptions) int {
+func sizeGroupType(p pointer, mi *MessageInfo, tagsize int, opts marshalOptions) int {
return 2*tagsize + mi.sizePointer(p.Elem(), opts)
}
-func appendGroupType(b []byte, p pointer, wiretag uint64, mi *MessageType, opts marshalOptions) ([]byte, error) {
+func appendGroupType(b []byte, p pointer, wiretag uint64, mi *MessageInfo, opts marshalOptions) ([]byte, error) {
b = wire.AppendVarint(b, wiretag) // start group
b, err := mi.marshalAppendPointer(b, p.Elem(), opts)
b = wire.AppendVarint(b, wiretag+1) // end group
@@ -190,7 +190,7 @@
}
func makeMessageSliceFieldCoder(fd pref.FieldDescriptor, ft reflect.Type) pointerCoderFuncs {
- if fi, ok := getMessageType(ft); ok {
+ if fi, ok := getMessageInfo(ft); ok {
return pointerCoderFuncs{
marshal: func(b []byte, p pointer, wiretag uint64, opts marshalOptions) ([]byte, error) {
return appendMessageSliceInfo(b, p, wiretag, fi, opts)
@@ -210,7 +210,7 @@
}
}
-func sizeMessageSliceInfo(p pointer, mi *MessageType, tagsize int, opts marshalOptions) int {
+func sizeMessageSliceInfo(p pointer, mi *MessageInfo, tagsize int, opts marshalOptions) int {
s := p.PointerSlice()
n := 0
for _, v := range s {
@@ -219,7 +219,7 @@
return n
}
-func appendMessageSliceInfo(b []byte, p pointer, wiretag uint64, mi *MessageType, opts marshalOptions) ([]byte, error) {
+func appendMessageSliceInfo(b []byte, p pointer, wiretag uint64, mi *MessageInfo, opts marshalOptions) ([]byte, error) {
s := p.PointerSlice()
var nerr errors.NonFatal
var err error
@@ -280,7 +280,7 @@
}
func makeGroupSliceFieldCoder(fd pref.FieldDescriptor, ft reflect.Type) pointerCoderFuncs {
- if fi, ok := getMessageType(ft); ok {
+ if fi, ok := getMessageInfo(ft); ok {
return pointerCoderFuncs{
size: func(p pointer, tagsize int, opts marshalOptions) int {
return sizeGroupSliceInfo(p, fi, tagsize, opts)
@@ -326,7 +326,7 @@
return b, nerr.E
}
-func sizeGroupSliceInfo(p pointer, mi *MessageType, tagsize int, opts marshalOptions) int {
+func sizeGroupSliceInfo(p pointer, mi *MessageInfo, tagsize int, opts marshalOptions) int {
s := p.PointerSlice()
n := 0
for _, v := range s {
@@ -335,7 +335,7 @@
return n
}
-func appendGroupSliceInfo(b []byte, p pointer, wiretag uint64, mi *MessageType, opts marshalOptions) ([]byte, error) {
+func appendGroupSliceInfo(b []byte, p pointer, wiretag uint64, mi *MessageInfo, opts marshalOptions) ([]byte, error) {
s := p.PointerSlice()
var nerr errors.NonFatal
var err error
diff --git a/internal/impl/message.go b/internal/impl/message.go
index 1c6ab9b..d64ee7f 100644
--- a/internal/impl/message.go
+++ b/internal/impl/message.go
@@ -18,10 +18,10 @@
piface "google.golang.org/protobuf/runtime/protoiface"
)
-// MessageType provides protobuf related functionality for a given Go type
-// that represents a message. A given instance of MessageType is tied to
+// MessageInfo provides protobuf related functionality for a given Go type
+// that represents a message. A given instance of MessageInfo is tied to
// exactly one Go type, which must be a pointer to a struct type.
-type MessageType struct {
+type MessageInfo struct {
// GoType is the underlying message Go type and must be populated.
// Once set, this field must never be mutated.
GoType reflect.Type // pointer to struct
@@ -53,13 +53,13 @@
var prefMessageType = reflect.TypeOf((*pref.Message)(nil)).Elem()
-// getMessageType returns the MessageType (if any) for a type.
+// getMessageInfo returns the MessageInfo (if any) for a type.
//
-// We find the MessageType by calling the ProtoReflect method on the type's
+// We find the MessageInfo by calling the ProtoReflect method on the type's
// zero value and looking at the returned type to see if it is a
-// messageReflectWrapper. Note that the MessageType may still be uninitialized
+// messageReflectWrapper. Note that the MessageInfo may still be uninitialized
// at this point.
-func getMessageType(mt reflect.Type) (mi *MessageType, ok bool) {
+func getMessageInfo(mt reflect.Type) (mi *MessageInfo, ok bool) {
method, ok := mt.MethodByName("ProtoReflect")
if !ok {
return nil, false
@@ -75,7 +75,7 @@
return m.mi, true
}
-func (mi *MessageType) init() {
+func (mi *MessageInfo) init() {
// This function is called in the hot path. Inline the sync.Once
// logic, since allocating a closure for Once.Do is expensive.
// Keep init small to ensure that it can be inlined.
@@ -85,7 +85,7 @@
mi.initOnce()
}
-func (mi *MessageType) initOnce() {
+func (mi *MessageInfo) initOnce() {
mi.initMu.Lock()
defer mi.initMu.Unlock()
if mi.initDone == 1 {
@@ -108,7 +108,7 @@
var sizecacheType = reflect.TypeOf(int32(0))
-func (mi *MessageType) makeMethods(t reflect.Type) {
+func (mi *MessageInfo) makeMethods(t reflect.Type) {
mi.extensionOffset = invalidOffset
if fx, _ := t.FieldByName("XXX_InternalExtensions"); fx.Type == extType {
mi.extensionOffset = offsetOf(fx)
@@ -135,7 +135,7 @@
oneofWrappersByNumber map[pref.FieldNumber]reflect.Type
}
-func (mi *MessageType) makeStructInfo(t reflect.Type) structInfo {
+func (mi *MessageInfo) makeStructInfo(t reflect.Type) structInfo {
// Generate a mapping of field numbers and names to Go struct field or type.
si := structInfo{
fieldsByNumber: map[pref.FieldNumber]reflect.StructField{},
@@ -186,7 +186,7 @@
//
// This code assumes that the struct is well-formed and panics if there are
// any discrepancies.
-func (mi *MessageType) makeKnownFieldsFunc(si structInfo) {
+func (mi *MessageInfo) makeKnownFieldsFunc(si structInfo) {
mi.fields = map[pref.FieldNumber]*fieldInfo{}
mi.fieldsOrdered = make([]*fieldInfo, 0, mi.PBType.Fields().Len())
for i := 0; i < mi.PBType.Descriptor().Fields().Len(); i++ {
@@ -230,7 +230,7 @@
}
}
-func (mi *MessageType) makeUnknownFieldsFunc(t reflect.Type) {
+func (mi *MessageInfo) makeUnknownFieldsFunc(t reflect.Type) {
if f := makeLegacyUnknownFieldsFunc(t); f != nil {
mi.unknownFields = f
return
@@ -240,7 +240,7 @@
}
}
-func (mi *MessageType) makeExtensionFieldsFunc(t reflect.Type) {
+func (mi *MessageInfo) makeExtensionFieldsFunc(t reflect.Type) {
if f := makeLegacyExtensionFieldsFunc(t); f != nil {
mi.extensionFields = f
return
@@ -250,16 +250,16 @@
}
}
-func (mi *MessageType) MessageOf(p interface{}) pref.Message {
+func (mi *MessageInfo) MessageOf(p interface{}) pref.Message {
return (*messageReflectWrapper)(mi.dataTypeOf(p))
}
-func (mi *MessageType) Methods() *piface.Methods {
+func (mi *MessageInfo) Methods() *piface.Methods {
mi.init()
return &mi.methods
}
-func (mi *MessageType) dataTypeOf(p interface{}) *messageDataType {
+func (mi *MessageInfo) dataTypeOf(p interface{}) *messageDataType {
// TODO: Remove this check? This API is primarily used by generated code,
// and should not violate this assumption. Leave this check in for now to
// provide some sanity checks during development. This can be removed if
@@ -273,14 +273,14 @@
// messageDataType is a tuple of a pointer to the message data and
// a pointer to the message type.
//
-// TODO: Unfortunately, we need to close over a pointer and MessageType,
+// TODO: Unfortunately, we need to close over a pointer and MessageInfo,
// which incurs an an allocation. This pair is similar to a Go interface,
// which is essentially a tuple of the same thing. We can make this efficient
// with reflect.NamedOf (see https://golang.org/issues/16522).
//
// With that hypothetical API, we could dynamically create a new named type
-// that has the same underlying type as MessageType.GoType, and
-// dynamically create methods that close over MessageType.
+// that has the same underlying type as MessageInfo.GoType, and
+// dynamically create methods that close over MessageInfo.
// Since the new type would have the same underlying type, we could directly
// convert between pointers of those types, giving us an efficient way to swap
// out the method set.
@@ -290,7 +290,7 @@
// 2. generate more types and methods, at the expense of binary size increase.
type messageDataType struct {
p pointer
- mi *MessageType
+ mi *MessageInfo
}
type messageReflectWrapper messageDataType
diff --git a/internal/impl/message_field_extension.go b/internal/impl/message_field_extension.go
index 47ccc45..ada2f87 100644
--- a/internal/impl/message_field_extension.go
+++ b/internal/impl/message_field_extension.go
@@ -45,7 +45,7 @@
}
type legacyExtensionFields struct {
- mi *MessageType
+ mi *MessageInfo
x *legacyExtensionMap
}
diff --git a/internal/impl/message_test.go b/internal/impl/message_test.go
index ba4aa51..26f8db6 100644
--- a/internal/impl/message_test.go
+++ b/internal/impl/message_test.go
@@ -189,7 +189,7 @@
MapBytes map[MyString]MyBytes
)
-var scalarProto2Type = pimpl.MessageType{GoType: reflect.TypeOf(new(ScalarProto2)), PBType: ptype.GoMessage(
+var scalarProto2Type = pimpl.MessageInfo{GoType: reflect.TypeOf(new(ScalarProto2)), PBType: ptype.GoMessage(
mustMakeMessageDesc(ptype.StandaloneMessage{
Syntax: pref.Proto2,
FullName: "ScalarProto2",
@@ -304,7 +304,7 @@
MyBytesA MyString `protobuf:"22"`
}
-var scalarProto3Type = pimpl.MessageType{GoType: reflect.TypeOf(new(ScalarProto3)), PBType: ptype.GoMessage(
+var scalarProto3Type = pimpl.MessageInfo{GoType: reflect.TypeOf(new(ScalarProto3)), PBType: ptype.GoMessage(
mustMakeMessageDesc(ptype.StandaloneMessage{
Syntax: pref.Proto3,
FullName: "ScalarProto3",
@@ -437,7 +437,7 @@
MyBytes4 ListStrings `protobuf:"19"`
}
-var listScalarsType = pimpl.MessageType{GoType: reflect.TypeOf(new(ListScalars)), PBType: ptype.GoMessage(
+var listScalarsType = pimpl.MessageInfo{GoType: reflect.TypeOf(new(ListScalars)), PBType: ptype.GoMessage(
mustMakeMessageDesc(ptype.StandaloneMessage{
Syntax: pref.Proto2,
FullName: "ListScalars",
@@ -628,7 +628,7 @@
}
}
-var mapScalarsType = pimpl.MessageType{GoType: reflect.TypeOf(new(MapScalars)), PBType: ptype.GoMessage(
+var mapScalarsType = pimpl.MessageInfo{GoType: reflect.TypeOf(new(MapScalars)), PBType: ptype.GoMessage(
mustMakeMessageDesc(ptype.StandaloneMessage{
Syntax: pref.Proto2,
FullName: "MapScalars",
@@ -807,7 +807,7 @@
Union isOneofScalars_Union `protobuf_oneof:"union"`
}
-var oneofScalarsType = pimpl.MessageType{GoType: reflect.TypeOf(new(OneofScalars)), PBType: ptype.GoMessage(
+var oneofScalarsType = pimpl.MessageInfo{GoType: reflect.TypeOf(new(OneofScalars)), PBType: ptype.GoMessage(
mustMakeMessageDesc(ptype.StandaloneMessage{
Syntax: pref.Proto2,
FullName: "OneofScalars",
@@ -1031,7 +1031,7 @@
Union isEnumMessages_Union `protobuf_oneof:"union"`
}
-var enumMessagesType = pimpl.MessageType{GoType: reflect.TypeOf(new(EnumMessages)), PBType: ptype.GoMessage(
+var enumMessagesType = pimpl.MessageInfo{GoType: reflect.TypeOf(new(EnumMessages)), PBType: ptype.GoMessage(
mustMakeMessageDesc(ptype.StandaloneMessage{
Syntax: pref.Proto2,
FullName: "EnumMessages",
diff --git a/internal/legacy/export.go b/internal/legacy/export.go
index 794a5e4..ec87a68 100644
--- a/internal/legacy/export.go
+++ b/internal/legacy/export.go
@@ -34,7 +34,7 @@
}
func (Export) MessageTypeOf(m interface{}) pref.MessageType {
- return loadMessageType(reflect.TypeOf(m)).PBType
+ return loadMessageInfo(reflect.TypeOf(m)).PBType
}
func (Export) MessageDescriptorOf(m interface{}) pref.MessageDescriptor {
diff --git a/internal/legacy/message.go b/internal/legacy/message.go
index 174615d..9919cdb 100644
--- a/internal/legacy/message.go
+++ b/internal/legacy/message.go
@@ -20,30 +20,30 @@
// wrapMessage wraps v as a protoreflect.ProtoMessage,
// where v must be a *struct kind and not implement the v2 API already.
func wrapMessage(v reflect.Value) pref.ProtoMessage {
- mt := loadMessageType(v.Type())
+ mt := loadMessageInfo(v.Type())
return mt.MessageOf(v.Interface()).Interface()
}
-var messageTypeCache sync.Map // map[reflect.Type]*MessageType
+var messageTypeCache sync.Map // map[reflect.Type]*MessageInfo
-// loadMessageType dynamically loads a *MessageType for t,
+// loadMessageInfo dynamically loads a *MessageInfo for t,
// where t must be a *struct kind and not implement the v2 API already.
-func loadMessageType(t reflect.Type) *pimpl.MessageType {
- // Fast-path: check if a MessageType is cached for this concrete type.
+func loadMessageInfo(t reflect.Type) *pimpl.MessageInfo {
+ // Fast-path: check if a MessageInfo is cached for this concrete type.
if mt, ok := messageTypeCache.Load(t); ok {
- return mt.(*pimpl.MessageType)
+ return mt.(*pimpl.MessageInfo)
}
- // Slow-path: derive message descriptor and initialize MessageType.
+ // Slow-path: derive message descriptor and initialize MessageInfo.
md := LoadMessageDesc(t)
- mt := new(pimpl.MessageType)
+ mt := new(pimpl.MessageInfo)
mt.GoType = t
mt.PBType = ptype.GoMessage(md, func(pref.MessageType) pref.Message {
p := reflect.New(t.Elem()).Interface()
return mt.MessageOf(p)
})
if mt, ok := messageTypeCache.LoadOrStore(t, mt); ok {
- return mt.(*pimpl.MessageType)
+ return mt.(*pimpl.MessageInfo)
}
return mt
}
diff --git a/internal/testprotos/conformance/conformance.pb.go b/internal/testprotos/conformance/conformance.pb.go
index b54a74d..200d5b0 100644
--- a/internal/testprotos/conformance/conformance.pb.go
+++ b/internal/testprotos/conformance/conformance.pb.go
@@ -667,7 +667,7 @@
}
var file_conformance_conformance_proto_enumTypes = make([]protoreflect.EnumType, 2)
-var file_conformance_conformance_proto_msgTypes = make([]protoimpl.MessageType, 4)
+var file_conformance_conformance_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_conformance_conformance_proto_goTypes = []interface{}{
(WireFormat)(0), // 0: conformance.WireFormat
(TestCategory)(0), // 1: conformance.TestCategory
diff --git a/internal/testprotos/conformance/test_messages_proto2.pb.go b/internal/testprotos/conformance/test_messages_proto2.pb.go
index d9846da..c0f5d52 100644
--- a/internal/testprotos/conformance/test_messages_proto2.pb.go
+++ b/internal/testprotos/conformance/test_messages_proto2.pb.go
@@ -1826,7 +1826,7 @@
}
var file_google_protobuf_test_messages_proto2_proto_enumTypes = make([]protoreflect.EnumType, 2)
-var file_google_protobuf_test_messages_proto2_proto_msgTypes = make([]protoimpl.MessageType, 26)
+var file_google_protobuf_test_messages_proto2_proto_msgTypes = make([]protoimpl.MessageInfo, 26)
var file_google_protobuf_test_messages_proto2_proto_goTypes = []interface{}{
(ForeignEnumProto2)(0), // 0: protobuf_test_messages.proto2.ForeignEnumProto2
(TestAllTypesProto2_NestedEnum)(0), // 1: protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum
diff --git a/internal/testprotos/conformance/test_messages_proto3.pb.go b/internal/testprotos/conformance/test_messages_proto3.pb.go
index 556efd8..b63c506 100644
--- a/internal/testprotos/conformance/test_messages_proto3.pb.go
+++ b/internal/testprotos/conformance/test_messages_proto3.pb.go
@@ -2040,7 +2040,7 @@
}
var file_google_protobuf_test_messages_proto3_proto_enumTypes = make([]protoreflect.EnumType, 3)
-var file_google_protobuf_test_messages_proto3_proto_msgTypes = make([]protoimpl.MessageType, 22)
+var file_google_protobuf_test_messages_proto3_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
var file_google_protobuf_test_messages_proto3_proto_goTypes = []interface{}{
(ForeignEnum)(0), // 0: protobuf_test_messages.proto3.ForeignEnum
(TestAllTypesProto3_NestedEnum)(0), // 1: protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum
diff --git a/internal/testprotos/legacy/legacy.pb.go b/internal/testprotos/legacy/legacy.pb.go
index 8253547..24b8853 100644
--- a/internal/testprotos/legacy/legacy.pb.go
+++ b/internal/testprotos/legacy/legacy.pb.go
@@ -258,7 +258,7 @@
return file_legacy_legacy_proto_rawDescData
}
-var file_legacy_legacy_proto_msgTypes = make([]protoimpl.MessageType, 1)
+var file_legacy_legacy_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_legacy_legacy_proto_goTypes = []interface{}{
(*Legacy)(nil), // 0: google.golang.org.Legacy
(*proto2_v0_0.Message)(nil), // 1: google.golang.org.proto2_20160225.Message
diff --git a/internal/testprotos/test/test.pb.go b/internal/testprotos/test/test.pb.go
index 91ac82e..cbf1c48 100644
--- a/internal/testprotos/test/test.pb.go
+++ b/internal/testprotos/test/test.pb.go
@@ -3314,7 +3314,7 @@
}
var file_test_test_proto_enumTypes = make([]protoreflect.EnumType, 4)
-var file_test_test_proto_msgTypes = make([]protoimpl.MessageType, 37)
+var file_test_test_proto_msgTypes = make([]protoimpl.MessageInfo, 37)
var file_test_test_proto_goTypes = []interface{}{
(ForeignEnum)(0), // 0: goproto.proto.test.ForeignEnum
(TestReservedEnumFields)(0), // 1: goproto.proto.test.TestReservedEnumFields
diff --git a/internal/testprotos/test/test_import.pb.go b/internal/testprotos/test/test_import.pb.go
index dc8365c..6bbafe9 100644
--- a/internal/testprotos/test/test_import.pb.go
+++ b/internal/testprotos/test/test_import.pb.go
@@ -124,7 +124,7 @@
}
var file_test_test_import_proto_enumTypes = make([]protoreflect.EnumType, 1)
-var file_test_test_import_proto_msgTypes = make([]protoimpl.MessageType, 1)
+var file_test_test_import_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_test_test_import_proto_goTypes = []interface{}{
(ImportEnum)(0), // 0: goproto.proto.test.ImportEnum
(*ImportMessage)(nil), // 1: goproto.proto.test.ImportMessage
diff --git a/internal/testprotos/test/test_public.pb.go b/internal/testprotos/test/test_public.pb.go
index ba065fc..050bf76 100644
--- a/internal/testprotos/test/test_public.pb.go
+++ b/internal/testprotos/test/test_public.pb.go
@@ -67,7 +67,7 @@
return file_test_test_public_proto_rawDescData
}
-var file_test_test_public_proto_msgTypes = make([]protoimpl.MessageType, 1)
+var file_test_test_public_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_test_test_public_proto_goTypes = []interface{}{
(*PublicImportMessage)(nil), // 0: goproto.proto.test.PublicImportMessage
}
diff --git a/internal/testprotos/test/weak/test_weak.pb.go b/internal/testprotos/test/weak/test_weak.pb.go
index 2cb834a..187848d 100644
--- a/internal/testprotos/test/weak/test_weak.pb.go
+++ b/internal/testprotos/test/weak/test_weak.pb.go
@@ -77,7 +77,7 @@
return file_test_weak_test_weak_proto_rawDescData
}
-var file_test_weak_test_weak_proto_msgTypes = make([]protoimpl.MessageType, 1)
+var file_test_weak_test_weak_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_test_weak_test_weak_proto_goTypes = []interface{}{
(*WeakImportMessage)(nil), // 0: goproto.proto.test.weak.WeakImportMessage
}
diff --git a/internal/testprotos/test3/test.pb.go b/internal/testprotos/test3/test.pb.go
index 31180d0..88f664f 100644
--- a/internal/testprotos/test3/test.pb.go
+++ b/internal/testprotos/test3/test.pb.go
@@ -1271,7 +1271,7 @@
}
var file_test3_test_proto_enumTypes = make([]protoreflect.EnumType, 2)
-var file_test3_test_proto_msgTypes = make([]protoimpl.MessageType, 20)
+var file_test3_test_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
var file_test3_test_proto_goTypes = []interface{}{
(ForeignEnum)(0), // 0: goproto.proto.test3.ForeignEnum
(TestAllTypes_NestedEnum)(0), // 1: goproto.proto.test3.TestAllTypes.NestedEnum
diff --git a/internal/testprotos/test3/test_import.pb.go b/internal/testprotos/test3/test_import.pb.go
index a281989..c36e2be 100644
--- a/internal/testprotos/test3/test_import.pb.go
+++ b/internal/testprotos/test3/test_import.pb.go
@@ -114,7 +114,7 @@
}
var file_test3_test_import_proto_enumTypes = make([]protoreflect.EnumType, 1)
-var file_test3_test_import_proto_msgTypes = make([]protoimpl.MessageType, 1)
+var file_test3_test_import_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_test3_test_import_proto_goTypes = []interface{}{
(ImportEnum)(0), // 0: goproto.proto.test3.ImportEnum
(*ImportMessage)(nil), // 1: goproto.proto.test3.ImportMessage