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
generated Python gRPC code cannot be imported when the path has dot #309
Comments
I am also looking for an update on this issue. Could it be possible to add the same default as for protobuf generation which generates by default the subdirectories automatically? |
I don't mind fixing the issue if you give me the go on how you want it fixed. |
@aaliddell what do you think? |
So I had a dig through the protobuf and grpc code to see where this was coming from when I was reviewing your PR. This is the draft message I was part way through writing and haven't had time recently to come back to sorry:
On that last point: what's the non-Bazel gRPC way of solving this with Python? i.e if you are running grpcio-tools yourself, how would you be expected to fix this? The hesitancy comes having to patch the import paths and introduce some "magic" that doesn't work outside of Bazel, especially since the code is changing the way NO_PREFIX_FLAT is behaving too. |
I'll try to get a patch merged upstream so that it fixes at least the path problem on gRPC |
Issue Description
The the path of proto files has dot (e.g., k8s.io/apimachinery/pkg/runtime/generated.proto), the Python modules generated by
python_grpc_library
cannot be importedLog Output
Notice the k8s/io vs k8s.io in the paths. The former can be imported, the latter cannot.
rules_proto_grpc Version
5.0.0-alpha3
Bazel Version
7.0.0
OS
Linux
Link to Demo Repo
No response
MODULE.bazel or WORKSPACE Content
BUILD Content
Proto Content
Any Other Content
The text was updated successfully, but these errors were encountered: