buildozer: add print_all_lists command for '+' list expressions (#1525) Buildozer's mutating list commands (`add`, `remove`, `replace`, `substitute`) and `print_comment <attr> <value>` traverse `+` concatenation expressions via `edit.AllLists`, operating on all top-level `*build.ListExpr` operands in expressions such as `["a", "b"] + select(...)` or `DEPS_VAR + ["a"]`. However, `print <attr>` relies on `Rule.AttrStrings` (`build.Strings`), which only matches a single `*build.ListExpr` and falls back to returning the raw formatted expression string whenever `+` is used. Unconditionally changing `print <attr>` would break existing callers that distinguish pure list literals from expressions containing variables or `select(...)`. Add `edit.AllListsStrings(e build.Expr) []string` to extract string literals across all top-level `*build.ListExpr` operands returned by `edit.AllLists(e)`, and expose a `print_all_lists <attribute(s)>` command in Buildozer that prints the combined string elements from all top-level list literals as a list (e.g. `["a"] + select(...)` prints `[a]`, and `VAR + ["a"] + ["b"]` prints `[a b]`).
This repository contains developer tools for working with Google's bazel buildtool.
See instructions in each tool's directory.