0

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?

Noel Yap
  • 18,822
  • 21
  • 92
  • 144
  • Do you actually want to diff lists or to exclude that file from the glob? https://bazel.build/reference/be/functions#glob – Matt Mackay May 04 '22 at 17:55

1 Answers1

3

glob provides a exclude attribute, e.g.:

glob(
    [
        ".editorconfig",
        ".gitattributes",
        "third_party/eigen-*/**",
    ],
    exclude = ["devertexwahn/flatland/copy.bara.sky"],
),
Vertexwahn
  • 7,709
  • 6
  • 64
  • 90