Allow combining `select[Label]`s
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 72
Description
### Description of the feature request:
With the new symbolic macros, it's [difficult to manipulate](https://bazel.build/docs/configurable-attributes#faq-select-macro) `attr.label` inputs, as they're wrapped in `select[Label]` objects. Allowing the following operation would regain a lot of functionality: `select[Label] + select[Label] -> select[list[Label]]`.
### Which category does this issue belong to?
Configurability, Starlark Interpreter
### What underlying problem are you trying to solve with this feature?
To retain flexibility in making labels a list of labels within a macro.
### Which operating system are you running Bazel on?
Ubuntu 24.04
### What is the output of `bazel info release`?
release 8.0.0
### If `bazel info release` returns `development 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` ?
```text
git@github.com:RyanDraves/nlb.git
b33e99e0d05e3016ca92680b186479c7b0ca0e2e
I removed the symbolic macros; I can make a branch re-adding them if requested. A full example is on [Slack](https://bazelbuild.slack.com/archives/CA31HN1T3/p1733981276254349?thread_ts=1733981177.926289&cid=CA31HN1T3).
```
### Have you found anything relevant by searching the web?
Relevant docs: https://bazel.build/docs/configurable-attributes#faq-select-macro
Relevant proposal: https://docs.google.com/document/d/1c-8GNkz57pDgBGPdJoXJ42aCFHr-gN-Ebon9Zx1COsk/edit?tab=t.0#heading=h.5mcn15i0e1ch
### Any other information, logs, or outputs that you want to share?
_No response_
Contributor guide
Research direction
Start with the configurable attributes FAQ and the linked proposal, then reproduce the reported limitation using the symbolic-macro example referenced in the issue. Determine the intended behavior for combining select[Label] values into select[list[Label]], and confirm that the implemented behavior preserves configurability and label typing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100