internal/impl: remove ExtensionFieldV1.Raw

CL/175579 switches v2 to use XXX_unrecognized exclusively.
CL/175838 switches v1 to use XXX_unrecognized exclusively.

This means that it is now safe to delete the Raw field.

Change-Id: Ic60c58147c2df4078e72c34d1202d226a7ea4bed
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/175839
Reviewed-by: Damien Neil <dneil@google.com>
This commit is contained in:
Joe Tsai 2019-05-07 15:32:22 -07:00 committed by Joe Tsai
parent 927aaba87c
commit 4a58eb3f7c
5 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
module github.com/golang/protobuf/v2/cmd/protoc-gen-go-grpc/testdata
require (
github.com/golang/protobuf v1.2.1-0.20190420064300-2b4f3c98b458
github.com/golang/protobuf v1.2.1-0.20190509013249-911a20d79252
github.com/golang/protobuf/v2 v2.0.0
google.golang.org/grpc v1.19.0
)

View File

@ -1,7 +1,7 @@
module github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata
require (
github.com/golang/protobuf v1.2.1-0.20190420064300-2b4f3c98b458
github.com/golang/protobuf v1.2.1-0.20190509013249-911a20d79252
github.com/golang/protobuf/v2 v2.0.0
)

2
go.mod
View File

@ -1,6 +1,6 @@
module github.com/golang/protobuf/v2
require (
github.com/golang/protobuf v1.2.1-0.20190420064300-2b4f3c98b458
github.com/golang/protobuf v1.2.1-0.20190509013249-911a20d79252
github.com/google/go-cmp v0.2.1-0.20190312032427-6f77996f0c42
)

4
go.sum
View File

@ -1,10 +1,12 @@
github.com/golang/protobuf v1.2.1-0.20190322195920-d94fb84e04b7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.2.1-0.20190326022002-be03c15fcaa2/go.mod h1:rZ4veVXHB1S2+o7TKqD9Isxml062IeDutnCDtFPUlCc=
github.com/golang/protobuf v1.2.1-0.20190416233244-13cf6e79fd39/go.mod h1:RgnTNLHWo9HXezTFX5MTeuXnXx9eeQX8y3Cukv+9HaE=
github.com/golang/protobuf v1.2.1-0.20190420064300-2b4f3c98b458 h1:vQpM9R/v2X3bLjRvDKfw215cmiOx0OZ5Y4SCxgmp7m4=
github.com/golang/protobuf v1.2.1-0.20190420064300-2b4f3c98b458/go.mod h1:hPB+itxf2EbA0J6prVtJg+ohMeLFLEhlSXXPS2qxTZE=
github.com/golang/protobuf v1.2.1-0.20190509013249-911a20d79252 h1:8GDqfGafxw0x8/UPOzOaVQPi1eceOzX0jrbRXPPck1E=
github.com/golang/protobuf v1.2.1-0.20190509013249-911a20d79252/go.mod h1:1lePdeOu8oinPqnsR0b0MT7mXK8t1iCeDN4TrHzKWEU=
github.com/golang/protobuf/v2 v2.0.0-20190322201422-f503c300f70e/go.mod h1:25ZALhydMFaBRgPH58a8zpFe9YXMAMjOYWtB6pNPcoo=
github.com/golang/protobuf/v2 v2.0.0-20190416222953-ab61d41ec93f/go.mod h1:baUT2weUsA1MR7ocRtLXLmi2B1s4VrUT3S6tO8AYzMw=
github.com/golang/protobuf/v2 v2.0.0-20190420063524-d24bc72368a2/go.mod h1:wcEMLTNPNYxBFS3yY7kunR0QKUgP/f+wzZaPeTbHi0g=
github.com/golang/protobuf/v2 v2.0.0-20190509012650-00a323deed55/go.mod h1:pWnbrfE+N2TBYiklDHixM32oa26kuZCiJwxIu0DAl7Y=
github.com/google/go-cmp v0.2.1-0.20190312032427-6f77996f0c42 h1:q3pnF5JFBNRz8sRD+IRj7Y6DMyYGTNqnZ9axTbSfoNI=
github.com/google/go-cmp v0.2.1-0.20190312032427-6f77996f0c42/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=

View File

@ -263,8 +263,6 @@ type ExtensionFieldV1 struct {
//
// The Value may only be populated if Desc is also populated.
Value interface{} // TODO: switch to protoreflect.Value
Raw []byte // TODO: remove; let this be handled by XXX_unrecognized
}
type legacyExtensionMap map[int32]ExtensionFieldV1