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
feat(bazel): support generation with x-api deps #138
base: main
Are you sure you want to change the base?
Conversation
a8f00c0
to
b9a62ad
Compare
Just a friendly bump on this @alexander-fenster and @parthea. Tony, I'd love your take on how this will impact/how this could aid Python GAPIC generation & the migration of |
@alexander-fenster could you review this when you have a chance please? Thanks |
@noahdietz py_gapic can now be used as a dependency instead of py_proto for python. I found that the dependency needs to be imported with See cl/520334574 as an example |
Wonderful! I will adjust this PR accordingly. |
Support BUILD.bazel file generation with cross-API dependencies. Such a dependency is identified by the presence of a version in the import path e.g.
google/cloud/foo/v1/bar.proto
, which would normally be converted into a dependency label likegoogle/cloud/foo/v1:bar_proto
. However, generated BUILD.bazel files in googleapis haveproto_library
targets that represent the entire package rather than one target per-proto-file. So, the API package is parsed out of the import path and used as the replacement in the label e.g.google/cloud/foo/v1:foo_proto
.Note: This implementation generates a
py_proto_library
dependency that will not have been generated into the dependency package and must be added manually. This can be fixed whenpy_gapic_library
targets can be used in their place (something @parthea has mentioned wanting to fix for this specific x-api dep scenario).Fixes http://b/269312831.