Skip to content

Commit

Permalink
[bazel] Remove empty globs
Browse files Browse the repository at this point in the history
In Bazel 8, the default is to disallow empty globs. Rather
than make more changes as we update, instead we'll flip the
flag now and fix up any issues. This will make the Bazel 8
update simpler.
  • Loading branch information
shs96c committed Feb 3, 2025
1 parent 29e858f commit b85e852
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 59 deletions.
5 changes: 4 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ try-import %workspace%/.bazelrc.windows.local
# https://github.com/bazelbuild/bazel/issues/20369
# https://github.com/bazelbuild/bazel/issues/21491

common --enable_bzlmod --lockfile_mode=off
common --lockfile_mode=off

# Prepare for Bazel 8. This becomes the default in 8.0.0
common --incompatible_disallow_empty_glob

# Ensure Windows support is accurate.

Expand Down
2 changes: 0 additions & 2 deletions dotnet/src/support/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ csharp_library(
"*.cs",
"Events/*.cs",
"Extensions/*.cs",
"PageObjects/**/*.cs",
"UI/*.cs",
]) + [":assembly-info"],
out = "WebDriver.Support",
Expand Down Expand Up @@ -71,7 +70,6 @@ csharp_library(
"*.cs",
"Events/*.cs",
"Extensions/*.cs",
"PageObjects/**/*.cs",
"UI/*.cs",
]) + [":assembly-info"],
out = "WebDriver.Support.StrongNamed",
Expand Down
5 changes: 1 addition & 4 deletions dotnet/test/support/Events/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ dotnet_nunit_test_suite(
name = "LargeTests",
size = "large",
srcs = glob(
[
"**/*Test.cs",
"**/*Tests.cs",
],
["*Test.cs"],
exclude = SMALL_TESTS,
) + [
"//dotnet/test/common:assembly-fixtures",
Expand Down
1 change: 0 additions & 1 deletion java/src/org/openqa/selenium/grid/session/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ java_library(
name = "session",
srcs = glob([
"*.java",
"remote/*.java",
]),
visibility = [
"//java/src/org/openqa/selenium/grid:__subpackages__",
Expand Down
31 changes: 0 additions & 31 deletions java/test/org/openqa/selenium/grid/sessionqueue/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,31 +0,0 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
load("//java:defs.bzl", "JUNIT5_DEPS", "java_test_suite")
load("//java:version.bzl", "TOOLS_JAVA_VERSION")

java_test_suite(
name = "SmallTests",
size = "small",
srcs = glob(["*Test.java"]),
javacopts = [
"--release",
TOOLS_JAVA_VERSION,
],
deps = [
"//java/src/org/openqa/selenium/events",
"//java/src/org/openqa/selenium/events/local",
"//java/src/org/openqa/selenium/grid/data",
"//java/src/org/openqa/selenium/grid/security",
"//java/src/org/openqa/selenium/grid/sessionqueue",
"//java/src/org/openqa/selenium/grid/sessionqueue/local",
"//java/src/org/openqa/selenium/grid/sessionqueue/remote",
"//java/src/org/openqa/selenium/json",
"//java/src/org/openqa/selenium/remote",
"//java/src/org/openqa/selenium/support",
"//java/test/org/openqa/selenium/grid/testing",
"//java/test/org/openqa/selenium/remote/tracing:tracing-support",
artifact("org.junit.jupiter:junit-jupiter-api"),
artifact("io.opentelemetry:opentelemetry-api"),
artifact("org.assertj:assertj-core"),
artifact("com.google.guava:guava"),
] + JUNIT5_DEPS,
)
17 changes: 0 additions & 17 deletions java/test/org/openqa/selenium/remote/codec/jwp/BUILD.bazel

This file was deleted.

1 change: 0 additions & 1 deletion javascript/grid-ui/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ js_library(

SRCS = glob(
[
"public/**/*",
"src/**/*",
],
exclude = [
Expand Down
1 change: 0 additions & 1 deletion javascript/node/selenium-webdriver/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ js_library(
"http/*.js",
"io/*.js",
"lib/*.js",
"lib/atoms/bidi-mutation-listener.js",
"lib/fedcm/*.js",
"net/*.js",
"remote/*.js",
Expand Down
1 change: 0 additions & 1 deletion rb/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ rb_binary(

rb_test(
name = "lint",
srcs = glob(["**/*.rb"]),
args = [
"--autocorrect",
"--config=rb/.rubocop.yml",
Expand Down

0 comments on commit b85e852

Please sign in to comment.