-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Update proto package imports to google.golang.org/protobuf/proto #3554
Comments
To change the protobuf API that gRPC depends on will be a big undertaking and the team currently does not have the resources to dedicate to it. We also need to make sure that none of our users are broken as we try to make this switch. |
I am wondering how many people use protobuf w/o gRPC? Because lack of gRPC support actually makes this release useless. |
@alexshtin You can use the protoc-gen-go generator from the v1.4.0 release of golang/protobuf to generate v2 forward-compatible proto and gRPC stubs. |
@odsod - apologies if this is a newbie question, but could you provide more details on how to do so? After installing and using v1.4.0 of protoc-gen-go I still get errors ("missing ProtoReflect method") when attempting to use generated types with the google.golang.org/protobuf import. The generated types still import github.com/golang/protobuf/proto. It's very possible I did something wrong. EDIT: Nevermind, I was doing it wrong. I checked out the v1.4.0 tag, built it, and generated the golang bindings using that version of protoc-gen-go. At that point I was able to use google.golang.org/protobuf |
I am really confused about these 2 go packages. I've just tried to generate go code from my proto files using
And yes, the first one supports gRPC plugin and the second one doesn't. Am I right that both generators are using "...second major revision of the Go protocol buffer API implemented by the Also noticed that https://github.com/protocolbuffers/protobuf-go/blob/master/go.mod and https://github.com/golang/protobuf/blob/master/go.mod are cross referencing each other. I didn't know that it is even possible. |
This version of
For backwards compatibility,
Edit: See below; protoc-gen-go-grpc isn't released yet. Use By default, https://github.com/grpc/grpc-go/blob/master/cmd/protoc-gen-go-grpc/README.md The
Note that you need to pass any options to both code generators ( |
@neild, actually we are still iterating on For more information and to track any potential changes, please see #3669. |
github.com/golang/protobuf is now "officially" deprecated, and this package has released 1.x, but code generated from this package still uses those deprecated imports. Perhaps it's time to revisit this issue? :) |
This is a non-trivial change (I started an attempt at it awhile back, thinking it would be quick), and the benefits are questionable, considering the v1 library is implemented using v2. At this time, we have no plans to complete this. |
Closing this due to lack of activity and priority. |
Fixes grpc#3554 Signed-off-by: Abhilash Pallerlamudi <stp.abhi@gmail.com>
What version of gRPC are you using?
1.28.1
What version of Go are you using (
go version
)?go1.13.5 darwin/amd64
What operating system (Linux, Windows, …) and version?
Mac - Catalina
What did you do?
Moved from "github.com/golang/protobuf/proto" to "google.golang.org/protobuf/proto"
What did you expect to see?
Compatibility with grpc-go.
What did you see instead?
WithDetails is expecting github.com/golang/protobuf/proto.Message while thir documentation says that package is depricated.
The text was updated successfully, but these errors were encountered: