-
-
Notifications
You must be signed in to change notification settings - Fork 684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support protobuf APIv2 (google.golang.org/protobuf) #2395
Comments
It would also be nice to support v1.4.0 of the old API, which is implemented using the new API for transition purposes. It's often impractical to switch an entire codebase in one go.
|
* Added org_golang_google_protobuf at v1.21.0 to go_rules_dependencies. This contains the new protobuf runtime. It doesn't seem like any *_gen rules are needed, so just using the gazelle patch for now. * Upgraded com_github_golang_protobuf to v1.4.0. The packages here are wrappers org_golang_google_protobuf. Newly generated code should work with the old interface. The *_gen targets are still in place, but they're simpler. * Added new dependencies for packages generated with //proto:go_proto, //proto:go_grpc, and //proto:go_proto_bootstrap, since the proto compiler imports more runtime packages. * We're still using the compiler from com_github_golang_protobuf. It's a wrapper for the new one. The new one doesn't support gRPC, and the gRPC proto compiler doesn't exist yet. See https://github.com/protocolbuffers/protobuf-go/releases#v1.20-grpc-support. Updates bazel-contrib#2395
* Added org_golang_google_protobuf at v1.21.0 to go_rules_dependencies. This contains the new protobuf runtime. It doesn't seem like any *_gen rules are needed, so just using the gazelle patch for now. * Upgraded com_github_golang_protobuf to v1.4.0. The packages here are wrappers org_golang_google_protobuf. Newly generated code should work with the old interface. The *_gen targets are still in place, but they're simpler. * Added new dependencies for packages generated with //proto:go_proto, //proto:go_grpc, and //proto:go_proto_bootstrap, since the proto compiler imports more runtime packages. * We're still using the compiler from com_github_golang_protobuf. It's a wrapper for the new one. The new one doesn't support gRPC, and the gRPC proto compiler doesn't exist yet. See https://github.com/protocolbuffers/protobuf-go/releases#v1.20-grpc-support. Updates #2395
Fixed in #2455. I was not able to update |
I'm testing this out and seeing a bunch of warnings like this:
Does that mean I've got the wrong version of some dependency? |
@ribrdb Please file a new issue with more information. |
As described at https://blog.golang.org/a-new-go-api-for-protocol-buffers
There is a new module for protocol buffers,
google.golang.org/protobuf
. The old version isgarden.eu.org/golang/protobuf
, which will continue to be maintained.At least the following needs to be done:
org_golang_google_protobuf
with any necessary patches togo_rules_dependencies
.go_proto_compiler
targets to point to the new compiler. My understanding is that code generated with the new compiler will work with the old API.go_proto_compiler
targets.The text was updated successfully, but these errors were encountered: