Skip to content
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

Generate go_proto_library with gRPC plugin #8

Closed
jayconrod opened this issue Dec 6, 2017 · 2 comments · Fixed by #48
Closed

Generate go_proto_library with gRPC plugin #8

jayconrod opened this issue Dec 6, 2017 · 2 comments · Fixed by #48
Labels

Comments

@jayconrod
Copy link
Contributor

We currently generate either go_proto_library or go_grpc_library, depending on whether .proto files have service declarations. go_grpc_library is now just a wrapper on go_proto_library with the grpc plugin, so we should generate that instead. We'll need to migrate existing instances.

We should avoid merging the compiler attribute in proto rules, since developers can set this to something else manually.

@ashi009
Copy link
Contributor

ashi009 commented Dec 20, 2017

I have a working prototype for this, which will generate go_proto_library with grpc complier. However I didn't put much effort in supporting converting exiting go_grpc_library to go_proto_library.

I think this work needs to be prioritized, as it will allow people to actually benefit from the new rules_go release.

@jayconrod
Copy link
Contributor Author

This is next in my queue, after importing dependencies from Gopkg.lock.

jayconrod pushed a commit to jayconrod/bazel-gazelle that referenced this issue Dec 22, 2017
* If a .proto file has a service definition, we will now generate a
  go_proto_library rule with a compilers dependency on
  "@io_bazel_rules_go//proto:go_grpc" instead of a go_grpc_library.
* Existing go_grpc_library rules will be fixed. This is a minor fix,
  since it doesn't rename, move, or delete rules, so it will run in
  update mode.

Fixes bazel-contrib#8
jayconrod added a commit that referenced this issue Dec 22, 2017
* If a .proto file has a service definition, we will now generate a
  go_proto_library rule with a compilers dependency on
  "@io_bazel_rules_go//proto:go_grpc" instead of a go_grpc_library.
* Existing go_grpc_library rules will be fixed. This is a minor fix,
  since it doesn't rename, move, or delete rules, so it will run in
  update mode.

Fixes #8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants