-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add github.com/golang/protobuf/proto.MessageV2 equivalent to google.golang.org/protobuf #1442
Comments
@neild what are your thoughts on this? |
What would the use case be for a Defining a public version of If gRPC wants to refer to |
The goal here is to stop importing
This wording from pkg.go.dev was scary to me:
I don't think a temporary solution is necessary here as long as there's buy-in for a more permanent option. We can just wait longer to stop referencing the deprecated-but-can-never-be-deleted |
Sorry, I was confusing the It might make sense to add a new package to |
|
I also liked the proposed |
Maybe the package name will be easier to choose if we define the symbols it will contain, and see how it will look when used? package protoadapt / protocompat / protoconvert / protolegacy
type MessageV1 = protoiface.MessageV1
func ToMessageV2(MessageV1 /* or GeneratedMessage to mirror proto.MessageV2()? */) proto.Message E.g. func foo(v1 protoadapt.MessageV1) {
v2 := protoadapt.ToMessageV2(v1)
// ...
} |
We have an increasing number of users (see new contributed PR to migrate to the newer proto packages grpc/grpc-go#5740) impacted by this. Could this be prioritized? |
@dsnet I'm happy to send a change for the same via Gerrit. |
Here's the draft change to review. |
…1 or v2 message. Fixes golang/protobuf#1442 Change-Id: I7ec60982be81d5dc060094ccec51d819b17a3a8f
Is there more needed for |
… or v2 message. Fixes golang/protobuf#1442 Change-Id: I7ec60982be81d5dc060094ccec51d819b17a3a8f
please, how do I solve this issue: go: module github.com/golang/protobuf is deprecated: Use the "google.golang.org/protobuf" module instead. |
Take a look at https://pkg.go.dev/google.golang.org/protobuf/protoadapt, but you'll need v1.30.0 of the module |
Also we need a
protoiface.MessageV1
that is allowed to be referenced by outside packages.Background: we have an API that accepts v1
proto.Message
s as a parameter. We would like to stop importing the oldgithub.heygears.com/golang/protobuf
since it is deprecated and our users keep complaining about it.@dsnet suggested the proto team might be interested in adding this in grpc/grpc-go#4330 (comment).
The text was updated successfully, but these errors were encountered: