Fully qualify :grpc_python_plugin Bazel macro so it can be used from other repos.#19183
Fully qualify :grpc_python_plugin Bazel macro so it can be used from other repos.#19183g-easy wants to merge 1 commit intogrpc:masterfrom
Conversation
|
Without this change, I get errors like: |
Otherwise I get an error when trying to use py_proto_library() from other repos. Also fix the proto_only=True case.
|
@g-easy Can you explain your use case? This was not a rule that we intended to make public. We're not opposed to doing so, but we don't want to unnecessarily tie ourselves to an API that hasn't gone through a thorough review. Once it's out in the wild, we're married to it. We were actually hoping that this rule would just be an interim solution and we'd move to https://github.com/stackb/rules_proto once their python issues are cleared up. (Speaking of which, they appear to have been closed since I last looked.) |
|
I need to add py_proto_libraries to googleapis for envoy to consume. @vam-google asked me to use grpc's py_proto_library instead of the one from protobuf (which uses srcs="file.proto" instead of deps="proto_library_target"). |
|
I'm willing to make the rule public with two caveats:
You can accomplish the first item with find src examples bazel -name 'BUILD' -o -name '*.bzl' -o -name BUILD.bazel | xargs sed -i 's/py_proto_library/grpc_py_proto_library/g'The name change will also require an accompanying internal change. I can take care of that part. Once this PR is complete in terms of content, I'll shepherd it through the import process. |
|
Could we please have separate rules for |
|
@vam-google - could you please elaborate why you wanted this rule instead of the one from protobuf? Related issue: bazelbuild/bazel#3935 |
|
@g-easy This rule is in line with C++. Both rules by default generate both protobuf code and gRPC stubs. By setting the The missing piece is the Let me elaborate on the problem a bit more deeply for context. What we're seeing is an asymmetry between the rules provided internally and those available in open source. Internally, the ecosystem is as follows:
So the Edit: The protobuf team also offers a |
|
CC @kyessenov |
|
@g-easy From the response on bazelbuild/bazel#3935, it doesn't sound like we should hold out hope for native Bazel support in the near term future. I'll work on a split-up of |
|
I think Thanks! |
No description provided.