-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Symbolic macros using attr.string_list #25257
Comments
You could set |
Thanks, @fmeum . That can workaround this particular case, but I still think there can be better docs to help people using |
The docs are there! Please see https://bazel.build/extending/macros#selects:
@fishy - is there a wording change or additional explanation that you would suggest we add? |
@tetromino Thanks for the link! I think the current doc answers my original question in this issue. So feel free to close this issue. On a side note, we just noticed that for |
@fishy - this is unfortunately expected because |
Page link:
https://bazel.build/rules/lib/toplevel/attr
Problem description (include actual vs expected text, if applicable):
I'm trying to convert a legacy macro to symbolic macro, but have trouble using
attr.string_list
.We have
oci_push
rules for pushing dev and prod oci images, defined as targets like//serviceA:docker_dev
,//serviceA:docker_prod
, etc., and a macro using multirun to push batches of images in CI systems. the macro is defined like this:and then in top-level
BUILD.bazel
we just define 3 rules to be used in different CI pipelines:in order to convert it to symbolic macro, I just renamed
multirun_rule
to_multirun_rule_impl
, then added:but this causes it to complain about:
Where do you see this issue? (include link to specific section of the page, if applicable)
the doc for
attr.string_list
doesn't really explain how to access the actual string list. For how to use them it points to https://bazel.build/extending/rules#implementation_function, which only explains how to use them in rules, but not how to use them in symbolic macros (in rules they were accessed viactx
, which is not available in symbolic macros)Any other information you'd like to share?
No response
The text was updated successfully, but these errors were encountered: