From e6cebd77271d06c8b2e43594ee4bdd66b6b5ce00 Mon Sep 17 00:00:00 2001 From: Xavier Bonaventura Date: Thu, 16 Feb 2023 23:07:37 +0100 Subject: [PATCH] Be explicit about alowing empty globs There are several globs that are empty and this prevents building with the incompatible flag #8195. This commit just makes it explicit that empty is allowed. --- packages/typescript/index.bzl | 2 +- packages/typescript/internal/BUILD.bazel | 5 ++++- third_party/github.com/bazelbuild/bazel-skylib/BUILD | 11 +++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/typescript/index.bzl b/packages/typescript/index.bzl index cd1ead466e..7a12654a38 100644 --- a/packages/typescript/index.bzl +++ b/packages/typescript/index.bzl @@ -449,7 +449,7 @@ def ts_project( if resolve_json_module == True: include.append("**/*.json") exclude.extend(["**/package.json", "**/package-lock.json", "**/tsconfig*.json"]) - srcs = native.glob(include, exclude) + srcs = native.glob(include, exclude, allow_empty = True) tsc_deps = deps if type(extends) == type([]): diff --git a/packages/typescript/internal/BUILD.bazel b/packages/typescript/internal/BUILD.bazel index a1c6ad72a6..cfc705615e 100644 --- a/packages/typescript/internal/BUILD.bazel +++ b/packages/typescript/internal/BUILD.bazel @@ -54,7 +54,10 @@ genrule( filegroup( name = "package_contents", - srcs = glob(["*.bzl"]) + [ + srcs = glob( + ["*.bzl"], + allow_empty = True, + ) + [ "//packages/typescript/internal/worker:package_contents", ], visibility = ["//packages/typescript:__subpackages__"], diff --git a/third_party/github.com/bazelbuild/bazel-skylib/BUILD b/third_party/github.com/bazelbuild/bazel-skylib/BUILD index 0b86b494c2..316292747b 100644 --- a/third_party/github.com/bazelbuild/bazel-skylib/BUILD +++ b/third_party/github.com/bazelbuild/bazel-skylib/BUILD @@ -15,9 +15,12 @@ filegroup( bzl_library( name = "bzl", - srcs = glob([ - "lib/*.bzl", - "rules/**/*.bzl", - ]), + srcs = glob( + [ + "lib/*.bzl", + "rules/**/*.bzl", + ], + allow_empty = True, + ), visibility = ["//visibility:public"], )