Skip to content

Commit 2da1b93

Browse files
committed
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 <[email protected]>
1 parent 212014e commit 2da1b93

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ module github.com/golang/protobuf
22

33
go 1.9
44

5-
require google.golang.org/protobuf v0.0.0-20190808204900-1799d1111a45
5+
require google.golang.org/protobuf v0.0.0-20190820203659-c0f8c0a24ece

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ google.golang.org/protobuf v0.0.0-20190717230113-f647c82cc3c7 h1:U6U+Hb+UKNGJB0e
2121
google.golang.org/protobuf v0.0.0-20190717230113-f647c82cc3c7/go.mod h1:yGm7aNHn9Bp1NIvj6+CVUkcJshu+Usshfd3A+YxEuI8=
2222
google.golang.org/protobuf v0.0.0-20190808204900-1799d1111a45 h1:SZXAIsI6RiG0T8bAF4dqHDHgdqJtOa6tkofjswKtU20=
2323
google.golang.org/protobuf v0.0.0-20190808204900-1799d1111a45/go.mod h1:tRqhEyKwbKqwt5CQZAuOtj09RfhLNklDOhndhYA9blU=
24+
google.golang.org/protobuf v0.0.0-20190820203659-c0f8c0a24ece h1:AFYGmds8FWBGNw0zddlFiGtDvkVFSnQ7J2bAdH4X9Xk=
25+
google.golang.org/protobuf v0.0.0-20190820203659-c0f8c0a24ece/go.mod h1:tRqhEyKwbKqwt5CQZAuOtj09RfhLNklDOhndhYA9blU=

internal/proto/common.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ import (
1313
"reflect"
1414

1515
"google.golang.org/protobuf/runtime/protoiface"
16+
"google.golang.org/protobuf/runtime/protoimpl"
1617
)
1718

1819
type (
1920
Message = protoiface.MessageV1
20-
ExtensionDesc = protoiface.ExtensionDescV1
21+
ExtensionDesc = protoimpl.ExtensionInfo
2122
)
2223

2324
// RequiredNotSetError is an error type returned by either Marshal or Unmarshal.

proto/extensions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ var errNotExtendable = errors.New("proto: not an extendable proto.Message")
8383

8484
type (
8585
ExtensionRange = protoiface.ExtensionRangeV1
86-
ExtensionDesc = protoiface.ExtensionDescV1
86+
ExtensionDesc = protoimpl.ExtensionInfo
8787
Extension = protoimpl.ExtensionFieldV1
8888
XXX_InternalExtensions = protoimpl.ExtensionFields
8989
)

0 commit comments

Comments
 (0)