Skip to content

Commit

Permalink
Be explicit about alowing empty globs
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
limdor committed Feb 16, 2023
1 parent aa0d91a commit e6cebd7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/typescript/index.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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([]):
Expand Down
5 changes: 4 additions & 1 deletion packages/typescript/internal/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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__"],
Expand Down
11 changes: 7 additions & 4 deletions third_party/github.com/bazelbuild/bazel-skylib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
)

0 comments on commit e6cebd7

Please sign in to comment.