Implement `.append()` on `select()`
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
Many Starlark macros use `.append()` on attributes like `deps` to inject additional dependencies. Buildifier also emits a lint warning when a single element is added to a list via `+=` rather than `.append()`.
This can be problematic for users of the macros as it silently makes the attribute non-configurable: `select()` only supports concatenation, not `.append()`.
Changing that by implenting `.append()` on `SelectorValue` and `SelectorList` would thus make many existing macros more useful as well as resolve the tension between the linter and configurability. If this is deemed useful, I would be willing to send a PR.
Contributor guide
Research direction
Locate the SelectorValue and SelectorList entry points and read how select() currently supports concatenation. Check existing tests for selector operations, then add coverage showing the intended .append() behavior for both types and confirming that configurable attributes remain usable.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100