Build with incompatible_disallow_empty_glob
In order to flip the flag, all downstream projects should be adapted. However, it is hard to fix them all if there are constant regressions. Adding it to the CI will ensure that once the project can build with incompatible_disallow_empty_glob it can keep building like that.
See: bazelbuild/bazel#15327
Closes #16670.
PiperOrigin-RevId: 501764139
Change-Id: I909a08364794bc657aa6fefce4cf094a10563571
diff --git a/.bazelrc b/.bazelrc
index 65b5b53..6ee970b 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -35,6 +35,9 @@
build --java_language_version=11
build --tool_java_language_version=11
+# Fail if a glob doesn't match anything (https://github.com/bazelbuild/bazel/issues/8195)
+build --incompatible_disallow_empty_glob
+
# User-specific .bazelrc
try-import %workspace%/user.bazelrc
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BUILD b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BUILD
index 7493cef..26c8abb 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BUILD
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BUILD
@@ -15,7 +15,6 @@
srcs = glob(["*.java"]),
resources = glob(
[
- "*.txt",
"*.WORKSPACE",
],
),