buildtools icon indicating copy to clipboard operation
buildtools copied to clipboard

[buildozer] `set` on unknown list name sets string as value

Open keith opened this issue 4 years ago • 0 comments

If you have a rule that has a list attr that isn't known (or at least isn't just deps) like this:

some_rule(
    name = "foo",
    something = [
        "foo",
    ],
)

and you run:

buildozer 'set something a b' :foo

You end up with:

cc_library(
    name = "foo",
    something = a,
)

Instead of:

cc_library(
    name = "foo",
    something = [
        "a",
        "b",
    ],
)

One potential workaround to this is to do:

buildozer 'remove something' 'add something a b' :foo

But it seems like this should work, or that there should be a set_list to do this

keith avatar Jul 15 '21 05:07 keith