How to get list diff in Skylark?

182 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 answers

0
Vertexwahn On BEST ANSWER

glob provides a exclude attribute, e.g.:

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