-
Notifications
You must be signed in to change notification settings - Fork 255
L86: aspect-based python bazel rules #263
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
Conversation
gnossen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting the time into writing this up. I think it's unlikely that anyone will complain, but better safe than sorry.
f73e067 to
f0e0b08
Compare
| * The aspect produces a custom [providers](https://docs.bazel.build/versions/main/skylark/rules.html#providers) `PyProtoInfo` that wraps a `PyInfo` provider to avoid creating spurious dependencies for Python users that interface with the `proto_library` rules through some other means. | ||
| * The `py_proto_library` and `py_grpc_library` rules will only be responsible for collecting the `PyInfo` providers from their dependencies. | ||
| * The `plugin` attribute must be removed from `py_proto_library`. Aspects require the declaration of all possible parameter values up front, so it would not be possible for the new aspects to continue supporting arbitrary plugins. (Note that the plugin feature is not used in gRPC. It was introduced to support [GAPIC](https://github.com/googleapis/gapic-generator-python), which no longer uses the feature.) | ||
| * No behavior change should be observed by the user of `py_proto_library` or `py_grpc_library` unless they rely on the (removed) `plugin` attribute. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to note this in v1.41.x release note.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything additional to mention in the gRFC? Or should this be addressed in the implementation PR?
|
I'm going to pause on this for a bit - there are enough open questions in-flight around import paths that I suspect a multi-step approach is going to be needed if we want to land a change like this. |
We only need an aspect for py_proto_library, since the py_grpc_library only needs codegen for the leaf proto.
e28fc15 to
b001219
Compare
|
I made a few minor revs here - I think we're ready to go now that the implementation is in good shape. |
b001219 to
a95d396
Compare
No description provided.