bazel(python): no py_(proto | grpc)_library targets to depend on when dependency has a GAPIC #46
Labels
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Milestone
When a proto depends on a proto in another package, there is a chance that the python target dependencies of the dependent target will be generated with the wrong dependency targets when the dependency is a GAPIC. This is because when a package is a GAPIC, the only python targets generated are the
py_gapic_library
andpy_gapic_assembly_pkg
targets - there are nopy_proto_library
orpy_grpc_library
targets generated. However, a dependent package is generated withpy_proto_library
andpy_grpc_library
targets as the dependencies. It really should be depending on thepy_gapic_assembly_pkg
target instead, which contains not only GAPIC code but also the protobuf & grpc code.I think a good solution would be for the non-GAPIC packages to be genreated with a
py_gapic_assembly_pkg
target with just the grpc & protobuf targets as the packaged sources. This way, we can change build_gen to always generate a dependency on this single target rather than having to determine which targets a dependency has to use.The text was updated successfully, but these errors were encountered: