From a804450cf6c6036396ced4165fcfe13a7e05ea88 Mon Sep 17 00:00:00 2001 From: Joe Tsai Date: Sat, 6 Jul 2019 17:38:44 -0700 Subject: [PATCH] all: fix stale comments Change-Id: I4bfef75bc74c8d876a3926635bea12bbbaf4993e Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/185238 Reviewed-by: Damien Neil --- cmd/protoc-gen-go/internal_gengo/reflect.go | 2 -- internal/impl/legacy_message.go | 5 +---- reflect/protoreflect/type.go | 2 -- runtime/protoiface/legacy.go | 2 -- 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/cmd/protoc-gen-go/internal_gengo/reflect.go b/cmd/protoc-gen-go/internal_gengo/reflect.go index c58a3ef2..42e2a3aa 100644 --- a/cmd/protoc-gen-go/internal_gengo/reflect.go +++ b/cmd/protoc-gen-go/internal_gengo/reflect.go @@ -17,8 +17,6 @@ import ( "google.golang.org/protobuf/types/descriptorpb" ) -// TODO: Add support for proto options. - func genReflectFileDescriptor(gen *protogen.Plugin, g *protogen.GeneratedFile, f *fileInfo) { g.P("var ", f.GoDescriptorIdent, " ", protoreflectPackage.Ident("FileDescriptor")) g.P() diff --git a/internal/impl/legacy_message.go b/internal/impl/legacy_message.go index f745a81c..fd3732fb 100644 --- a/internal/impl/legacy_message.go +++ b/internal/impl/legacy_message.go @@ -90,14 +90,11 @@ var ( aberrantMessageDescCache map[reflect.Type]protoreflect.MessageDescriptor ) -// aberrantLoadEnumDesc returns an EnumDescriptor derived from the Go type, +// aberrantLoadMessageDesc returns an EnumDescriptor derived from the Go type, // which must not implement protoreflect.ProtoMessage or messageV1. // // This is a best-effort derivation of the message descriptor using the protobuf // tags on the struct fields. -// -// The finalized flag determines whether the returned message descriptor must -// be fully initialized. func aberrantLoadMessageDesc(t reflect.Type) pref.MessageDescriptor { aberrantMessageDescLock.Lock() defer aberrantMessageDescLock.Unlock() diff --git a/reflect/protoreflect/type.go b/reflect/protoreflect/type.go index d252cafd..53ffea4c 100644 --- a/reflect/protoreflect/type.go +++ b/reflect/protoreflect/type.go @@ -27,8 +27,6 @@ type Descriptor interface { // Support for this functionality is optional and may return nil. ParentFile() FileDescriptor - // TODO: Switch the signature of Parent to drop the bool. - // Parent returns the parent containing this descriptor declaration. // The following shows the mapping from child type to possible parent types: // diff --git a/runtime/protoiface/legacy.go b/runtime/protoiface/legacy.go index 56f3e788..4f8d71f1 100644 --- a/runtime/protoiface/legacy.go +++ b/runtime/protoiface/legacy.go @@ -22,8 +22,6 @@ type ExtensionDescV1 struct { // Type is the descriptor type for the extension field using the v2 API. // If populated, the information in this field takes precedence over // all other fields in ExtensionDescV1. - // - // TODO: Delete this and make this whole struct implement ExtensionDescV1. Type protoreflect.ExtensionType // ExtendedType is a typed nil-pointer to the parent message type that