orange-journalist-38284
02/05/2025, 7:30 PMprotobuf_sources(grpc=True). I think it's related to this unresolved issue. For example, the file //protobuf/third_party/a_pkg/a.proto will create a file dist/codegen/protobuf/third_party/a_pkg/a_pb2_grpc.py , which attempts to do an import like: from a_pkg import ... . This import fails, since it would need to be from protobuf.third_party.a_pkg import ....
In the thread I linked, it looks like there's a fix by passing different arguments to protoc, is there a way to do this with protobuf_sources?broad-processor-92400
02/06/2025, 9:10 AMorange-journalist-38284
02/06/2025, 5:37 PMexport-codegen hook somehow.broad-processor-92400
02/06/2025, 9:57 PMadhoc_tool + experimental_wrap_as_python_sources to run that tool.
Another option would be to 'just' suffer the protoc layout and import them a the top level rather than protobuf.third_party.a_pkg. I understand that might be very undesirable, though.orange-journalist-38284
02/07/2025, 6:00 PMadhoc_tool approach, thanks for the pointer.