How to get list diff in Skylark?

189 Views Asked by At

I'd like to do something like:

    srcs = glob(["*.proto"]) - ["some.proto"],

That particular syntax isn't valid in Skylark. How do I go about accomplishing a list diff in Skylark?

1

There are 1 best solutions below

0
On BEST ANSWER

glob provides a exclude attribute, e.g.:

glob(
    [
        ".editorconfig",
        ".gitattributes",
        "third_party/eigen-*/**",
    ],
    exclude = ["devertexwahn/flatland/copy.bara.sky"],
),