Allow declaring new private attributes when inheriting in a symbolic macro #25055
Labels
team-Loading-API
BUILD file and macro processing: labels, package(), visibility, glob
type: feature request
untriaged
Description of the feature request:
When defining a symbolic macro based on an existing rule or macro and using attribute inheritance, it's not possible to add a new attribute not present in the rule or macro being inherited.
Adding new attributes may be useful, particularly if they're private. For example, let's say I'm wrapping
java_test
to use my own test runner. I imagine the ideal way to provide my test runner to the macro is via a private atribute, similary to how we would do it if we were defining a rule:While I can understand adding public attributes could not be desired, I think allowing private attributes can be very useful.
Which category does this issue belong to?
Rules API
What underlying problem are you trying to solve with this feature?
Creating more powerful macros.
Which operating system are you running Bazel on?
WSL
What is the output of
bazel info release
?release 8.0.0
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: