Skip to content

[buildozer]: Support adding symbols instead of literal strings #1232

Description

@justhecuke

If I want to, for example, add a symbol with a value to a list, that is not possible right now.

buildozer 'add tags SOME_CONST' //pkg:target
-->
some_rule(
  name = "target",
  tags = ["SOME_CONST"],
  ...
)

What I want is the ability to do something such as:

buildozer --symbol 'add tags SOME_CONST' //pkg:target
-->
some_rule(
  name = "target",
  tags = [SOME_CONST],
  ...
)

and

buildozer --symbol 'set tags LIST_CONST' //pkg:target
-->
some_rule(
  name = "target",
  tags = LIST_CONST,
  ...
)

In this way, we can use buildozer better for larger refactors if we want to centralize control of a few key attributes without needing to create a mess of macros and rules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2We'll consider working on this in future. (Assignee optional)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions