Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,23 @@ try-import %workspace%/.bazelrc.windows.local

common --lockfile_mode=off

# Prepare for Bazel 8. These become the default in 8.0.0
common --incompatible_disallow_empty_glob
common --incompatible_use_plus_in_repo_names
# Bazel 8 compatibility flags. We should find ways to avoid needing these
common --legacy_external_runfiles

# Ensure Windows support is accurate.

startup --windows_enable_symlinks
build --enable_runfiles

build --flag_alias=pin_browsers=//common:pin_browsers
build --flag_alias=headless=//common:headless

# Set the default java toolchain

build --java_language_version=21
build --java_runtime_version=remotejdk_21
build --tool_java_language_version=21
build --tool_java_runtime_version=remotejdk_21

# We target java 11 by default

build --javacopt="--release 11"

# Require java dependencies to be used and first-order
Expand All @@ -45,7 +41,7 @@ build --javacopt="-Xep:WildcardImport:ERROR"
build --nobuild_runfile_links

# More JS magic
build --experimental_allow_unresolved_symlinks
build --allow_unresolved_symlinks
# Avoid a warning about directory tracking being unsound
startup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1

Expand All @@ -62,7 +58,17 @@ query --@aspect_rules_ts//ts:default_to_tsc_transpiler

build --incompatible_strict_action_env

# Required for prebuilt protoc to be used
common --incompatible_enable_proto_toolchain_resolution

# Ensure that we don't accidentally build protobuf or gRPC
common --per_file_copt=external/.*protobuf.*@--PROTOBUF_WAS_NOT_SUPPOSED_TO_BE_BUILT
common --host_per_file_copt=external/.*protobuf.*@--PROTOBUF_WAS_NOT_SUPPOSED_TO_BE_BUILT
common --per_file_copt=external/.*grpc.*@--GRPC_WAS_NOT_SUPPOSED_TO_BE_BUILT
common --host_per_file_copt=external/.*grpc.*@--GRPC_WAS_NOT_SUPPOSED_TO_BE_BUILT

# Required to get `protobuf` compiling, which is required for `rules_closure`
common --incompatible_enable_proto_toolchain_resolution
build --incompatible_enable_cc_toolchain_resolution
build:linux --cxxopt=-std=c++17
build:linux --host_cxxopt=-std=c++17
Expand All @@ -75,19 +81,16 @@ build:windows --host_per_file_copt=external/protobuf\\+.*@/w
common --define=protobuf_allow_msvc=true

# For build stamping

build --enable_platform_specific_config
build:linux --workspace_status_command=scripts/build-info.sh
build:macos --workspace_status_command=scripts/build-info.sh
build:windows --workspace_status_command="powershell.exe scripts/build-info.ps1"

# Make sure we get something helpful when tests fail

build --verbose_failures
build --test_output=errors

# pass environment variables to the test environment

test --test_env=CI
test --test_env=DASHBOARD_URL
test --test_env=DISPLAY
Expand All @@ -99,7 +102,6 @@ test --test_env=PYTHON_VERSION
test --test_env=SE_AVOID_STATS=true

# Remove once rules_ruby support proper $LOAD_PATH expansion.

test --test_env=RUBYOPT="-Irb/lib -w"

# Speed up JRuby startup.
Expand All @@ -109,7 +111,6 @@ build --action_env=JRUBY_OPTS="--dev"
test --test_env=JRUBY_OPTS="--dev"

# Expose necessary variables for Selenium-Manager.

test:windows --test_env=PATH
test:windows --test_env=LOCALAPPDATA
test:windows --test_env=PROCESSOR_ARCHITECTURE
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.4.1
9.0.0
1 change: 1 addition & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
load("@aspect_rules_js//npm:defs.bzl", "npm_link_package")
load("@buildifier_prebuilt//:rules.bzl", "buildifier")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("@rules_java//java:java_binary.bzl", "java_binary")
load("//common:browsers.bzl", "chrome_data", "firefox_data")
load("//java:browsers.bzl", "chrome_jvm_flags", "firefox_jvm_flags")
load("//java:defs.bzl", "artifact")
Expand Down
84 changes: 62 additions & 22 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,39 +1,71 @@
module(name = "selenium")

bazel_dep(name = "apple_rules_lint", version = "0.4.0")
bazel_dep(name = "aspect_bazel_lib", version = "2.14.0")
bazel_dep(name = "aspect_rules_esbuild", version = "0.21.0")
bazel_dep(name = "aspect_bazel_lib", version = "2.22.5")
bazel_dep(name = "aspect_rules_esbuild", version = "0.25.0")
bazel_dep(name = "aspect_rules_jest", version = "0.24.3")
bazel_dep(name = "aspect_rules_js", version = "2.3.7")
bazel_dep(name = "aspect_rules_ts", version = "3.6.0")
bazel_dep(name = "bazel_features", version = "1.32.0")
bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "buildifier_prebuilt", version = "7.3.1")
bazel_dep(name = "contrib_rules_jvm", version = "0.27.0")
bazel_dep(name = "aspect_rules_js", version = "2.8.3")
bazel_dep(name = "aspect_rules_ts", version = "3.8.3")
bazel_dep(name = "bazel_features", version = "1.39.0")
bazel_dep(name = "bazel_skylib", version = "1.9.0")
bazel_dep(name = "buildifier_prebuilt", version = "8.2.1.2")
bazel_dep(name = "contrib_rules_jvm", version = "0.32.0")
bazel_dep(name = "platforms", version = "1.0.0")

# If you update this, also update the prebuilt version of `protoc` we use below
bazel_dep(name = "protobuf", version = "33.0")

# Required for rules_rust to import the crates properly
bazel_dep(name = "rules_cc", version = "0.2.8", dev_dependency = True)
bazel_dep(name = "rules_cc", version = "0.2.16", dev_dependency = True)

bazel_dep(name = "rules_closure", version = "0.15.0")
bazel_dep(name = "rules_dotnet", version = "0.20.5")
bazel_dep(name = "rules_java", version = "8.7.1")
bazel_dep(name = "rules_jvm_external", version = "6.8")
bazel_dep(name = "rules_multitool", version = "1.3.0")
bazel_dep(name = "rules_nodejs", version = "6.3.2")
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "rules_python", version = "1.7.0")
bazel_dep(name = "rules_proto", version = "7.0.2")
bazel_dep(name = "rules_ruby", version = "0.19.0")
bazel_dep(name = "rules_rust", version = "0.67.0")

# Until `rules_jvm_external` 6.8 ships
bazel_dep(name = "rules_dotnet", version = "0.21.5")

# See below for actual version used
bazel_dep(name = "rules_java", version = "0.0.0")
bazel_dep(name = "rules_jvm_external", version = "6.9")
bazel_dep(name = "rules_multitool", version = "1.11.1")
bazel_dep(name = "rules_nodejs", version = "6.7.3")
bazel_dep(name = "rules_oci", version = "2.2.7")
bazel_dep(name = "rules_pkg", version = "1.2.0")
bazel_dep(name = "rules_python", version = "1.8.3")
bazel_dep(name = "rules_proto", version = "7.1.0")
bazel_dep(name = "rules_ruby", version = "0.21.1")
bazel_dep(name = "rules_rust", version = "0.68.1")
bazel_dep(name = "toolchains_protoc", version = "0.6.1")

git_override(
module_name = "aspect_rules_js",
remote = "https://github.com/aspect-build/rules_js.git",
commit = "37eb63ff72a677203aec58f57720dd97a4f788a8",
)

# Use latest rules_android for Bazel 9 compatibility
git_override(
module_name = "rules_android",
remote = "https://github.com/bazelbuild/rules_android.git",
commit = "880cd0e130e0f1e598c2ad7b0695070c0b34d946",
)

# Force rules_java version to avoid Unsafe warnings in remote_java_tools
single_version_override(
module_name = "rules_java",
version = "9.3.0",
)

# Use latest rules_jvm_external for Bazel 9 compatibility
git_override(
module_name = "rules_jvm_external",
remote = "https://github.com/bazel-contrib/rules_jvm_external.git",
commit = "2c50ea48e365dd47a20454a9f260cb7736f9435d",
patch_strip = 1,
patches = ["//java:rules_jvm_external_javadoc.patch"],
patches = ["//third_party/bazel:rules_jvm_external_javadoc.patch"],
)





multitool = use_extension("@rules_multitool//multitool:extension.bzl", "multitool")
multitool.hub(lockfile = "//:multitool.lock.json")
use_repo(multitool, "multitool")
Expand Down Expand Up @@ -235,6 +267,7 @@ maven.install(
fail_on_missing_checksum = True,
fetch_sources = True,
known_contributing_modules = [
"protobuf",
"rules_closure",
"rules_web_testing_java",
"selenium",
Expand Down Expand Up @@ -371,6 +404,13 @@ crate.from_cargo(
)
use_repo(crate, "crates")

# Override the toolchain registration from the protobuf module
protoc = use_extension("@toolchains_protoc//protoc:extensions.bzl", "protoc")
protoc.toolchain(version = "v33.0")
use_repo(protoc, "toolchains_protoc_hub")

register_toolchains("@toolchains_protoc_hub//:all")

selenium_manager_artifacts = use_extension("//common:selenium_manager.bzl", "selenium_manager_artifacts")
use_repo(
selenium_manager_artifacts,
Expand Down
2 changes: 1 addition & 1 deletion common/remote-build/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ platform(
"dockerUseEntrypoint": "True",
"sandboxAllowed": "False",
},
parents = ["@local_config_platform//:host"],
parents = ["@platforms//host"],
)
1 change: 1 addition & 0 deletions common/remote-build/cc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

# This becomes the BUILD file for @local_config_cc// under non-BSD unixes.

load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("@rules_cc//cc:defs.bzl", "cc_toolchain", "cc_toolchain_suite")
load(":armeabi_cc_toolchain_config.bzl", "armeabi_cc_toolchain_config")
load(":cc_toolchain_config.bzl", "cc_toolchain_config")
Expand Down
2 changes: 2 additions & 0 deletions common/remote-build/cc/armeabi_cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ load(
"feature",
"tool_path",
)
load("@rules_cc//cc/common:cc_common.bzl", "cc_common")
load("@rules_cc//cc/private/toolchain_config:cc_toolchain_config_info.bzl", "CcToolchainConfigInfo")

def _impl(ctx):
toolchain_identifier = "stub_armeabi-v7a"
Expand Down
2 changes: 2 additions & 0 deletions common/remote-build/cc/cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ load(
"variable_with_value",
"with_feature_set",
)
load("@rules_cc//cc/common:cc_common.bzl", "cc_common")
load("@rules_cc//cc/private/toolchain_config:cc_toolchain_config_info.bzl", "CcToolchainConfigInfo")

def layering_check_features(compiler):
if compiler != "clang":
Expand Down
2 changes: 2 additions & 0 deletions cpp/linux-specific/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_cc//cc:cc_binary.bzl", "cc_binary")

cc_binary(
name = "noblur64",
srcs = glob([
Expand Down
2 changes: 2 additions & 0 deletions java/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
load("@contrib_rules_jvm//java:defs.bzl", "spotbugs_binary", "spotbugs_config")
load("@rules_java//java:java_library.bzl", "java_library")
load("@rules_java//java:java_plugin.bzl", "java_plugin")
load(":defs.bzl", "artifact")

exports_files(
Expand Down
4 changes: 2 additions & 2 deletions java/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ load("//java/private:module.bzl", _java_module = "java_module")
load("//java/private:selenium_test.bzl", _selenium_test = "selenium_test")
load("//java/private:suite.bzl", _java_selenium_test_suite = "java_selenium_test_suite")

def java_test_suite(name, runner = "junit5", **kwargs):
_java_test_suite(name = name, runner = runner, **kwargs)
def java_test_suite(name, **kwargs):
_java_test_suite(name = name, **kwargs)

SINGLE_BROWSER = ["chrome"]

Expand Down
Loading
Loading