proto: rename protoiface.ExtensionDescV1 to protoimpl.ExtensionInfo This is change 2/5 in a series of commits changing protoV1.ExtensionDesc to directly implement protoreflect.ExtensionType. 1. [v2] Add protoimpl.ExtensionInfo as an alias for protoiface.ExtensionDescV1. 2. [v1] Update references to protoimpl.ExtensionInfo to use protoiface.ExtensionInfo. 3. [v2] Create protoimpl.ExtensionInfo (an alias to a new type in the impl package) and remove protoiface.ExtensionDescV1. 4. [v1] Remove unneeded explicit conversions between ExtensionDesc and ExtensionType (since the former now directly implements the latter). 5. [v2] Remove stub conversion functions. Change-Id: Icf5f789bac950bda14e84b8f6250e0399cb0efdf Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/189677 Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
diff --git a/go.mod b/go.mod index 3fc66a3..60767d2 100644 --- a/go.mod +++ b/go.mod
@@ -2,4 +2,4 @@ go 1.9 -require google.golang.org/protobuf v0.0.0-20190808204900-1799d1111a45 +require google.golang.org/protobuf v0.0.0-20190820203659-c0f8c0a24ece
diff --git a/go.sum b/go.sum index 871dc86..78a69d3 100644 --- a/go.sum +++ b/go.sum
@@ -21,3 +21,5 @@ google.golang.org/protobuf v0.0.0-20190717230113-f647c82cc3c7/go.mod h1:yGm7aNHn9Bp1NIvj6+CVUkcJshu+Usshfd3A+YxEuI8= google.golang.org/protobuf v0.0.0-20190808204900-1799d1111a45 h1:SZXAIsI6RiG0T8bAF4dqHDHgdqJtOa6tkofjswKtU20= google.golang.org/protobuf v0.0.0-20190808204900-1799d1111a45/go.mod h1:tRqhEyKwbKqwt5CQZAuOtj09RfhLNklDOhndhYA9blU= +google.golang.org/protobuf v0.0.0-20190820203659-c0f8c0a24ece h1:AFYGmds8FWBGNw0zddlFiGtDvkVFSnQ7J2bAdH4X9Xk= +google.golang.org/protobuf v0.0.0-20190820203659-c0f8c0a24ece/go.mod h1:tRqhEyKwbKqwt5CQZAuOtj09RfhLNklDOhndhYA9blU=
diff --git a/internal/proto/common.go b/internal/proto/common.go index d53d2ae..f03c790 100644 --- a/internal/proto/common.go +++ b/internal/proto/common.go
@@ -13,11 +13,12 @@ "reflect" "google.golang.org/protobuf/runtime/protoiface" + "google.golang.org/protobuf/runtime/protoimpl" ) type ( Message = protoiface.MessageV1 - ExtensionDesc = protoiface.ExtensionDescV1 + ExtensionDesc = protoimpl.ExtensionInfo ) // RequiredNotSetError is an error type returned by either Marshal or Unmarshal.
diff --git a/proto/extensions.go b/proto/extensions.go index adf24b9..0f0f4b6 100644 --- a/proto/extensions.go +++ b/proto/extensions.go
@@ -83,7 +83,7 @@ type ( ExtensionRange = protoiface.ExtensionRangeV1 - ExtensionDesc = protoiface.ExtensionDescV1 + ExtensionDesc = protoimpl.ExtensionInfo Extension = protoimpl.ExtensionFieldV1 XXX_InternalExtensions = protoimpl.ExtensionFields )