-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Can not manipulate select statement in macros #8419
Copy link
Copy link
Open
Labels
P3We're not considering working on this, but happy to review a PR. (No assignee)We're not considering working on this, but happy to review a PR. (No assignee)not staleIssues or PRs that are inactive but not considered staleIssues or PRs that are inactive but not considered staleteam-Configurabilityplatforms, toolchains, cquery, select(), config transitionsplatforms, toolchains, cquery, select(), config transitionstype: feature request
Metadata
Metadata
Assignees
Labels
P3We're not considering working on this, but happy to review a PR. (No assignee)We're not considering working on this, but happy to review a PR. (No assignee)not staleIssues or PRs that are inactive but not considered staleIssues or PRs that are inactive but not considered staleteam-Configurabilityplatforms, toolchains, cquery, select(), config transitionsplatforms, toolchains, cquery, select(), config transitionstype: feature request
Description of the feature request:
The rules_k8s have a rule
k8s_objectswhich takes a list of labels (k8s_objecttargets) and creates multiple targets with these labels, with custom endings, that it knows have been created from the underlyingk8s_object. So there is code like[x + ".create" for x in objects]If objects is now aselectstatement that fails with something like: select is not iterable. IT would be nice if I could still iterate over aselectstatement similar to a dict, so I could manipulate the labels in the macro.Feature requests: what underlying problem are you trying to solve with this feature?
Now I have to use a normal
dictas a workaround which the macro then converts into aselectstatement. I think this ends up being confusing for the end-user as that is not usualWhat's the output of
bazel info release?0.25.2
Have you found anything relevant by searching the web?
#8171 but seems not directly related
Any other information, logs, or outputs that you want to share?
For the exact use of this see PR: bazelbuild/rules_k8s#342