Skip to content

Commit

Permalink
Be explicit about alowing empty globs (second part)
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 bazelbuild#8195.
This commit just makes it explicit that empty is allowed.

Closes bazelbuild#15339.

PiperOrigin-RevId: 469973537
Change-Id: Ie7edea8767153e8ce76ca9193401b9f96147445d
  • Loading branch information
limdor authored and aiuto committed Oct 12, 2022
1 parent 4938837 commit 330a0b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions site/en/BUILD → site/en/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ exports_files(
"versions/_toc.yaml",
],
visibility = [
"//scripts/docs:__pkg__",
"//src/test/java/com/google/devtools/build/lib/packages:__pkg__",
"//third_party/bazel/scripts/docs:__pkg__",
"//third_party/bazel/src/test/java/com/google/devtools/build/lib/packages:__pkg__",
],
)

filegroup(
name = "srcs",
srcs = glob(["**"]),
visibility = [
"//scripts/docs:__pkg__",
"//site:__pkg__",
"//third_party/bazel/scripts/docs:__pkg__",
"//third_party/bazel/site:__pkg__",
],
)

Expand All @@ -29,5 +29,5 @@ pkg_tar(
exclude = ["**/BUILD"],
),
strip_prefix = "/site/en",
visibility = ["//scripts/docs:__pkg__"],
visibility = ["//third_party/bazel/scripts/docs:__pkg__"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public void newLocalRepository() throws Exception {

@Test
public void buildDotBazelForSubpackageCheckDuringGlobbing() throws Exception {
file("a/BUILD", "filegroup(name = 'fg', srcs = glob(['sub/a.txt']))");
file("a/BUILD", "filegroup(name = 'fg', srcs = glob(['sub/a.txt'], allow_empty = True))");
file("a/sub/a.txt");
file("a/sub/BUILD.bazel");

Expand Down

0 comments on commit 330a0b1

Please sign in to comment.