Skip to content

Commit b5bb51b

Browse files
committed
[bazel] Migrate to Bazel 8
1 parent 2357514 commit b5bb51b

File tree

4 files changed

+20
-19
lines changed

4 files changed

+20
-19
lines changed

.bazelrc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ try-import %workspace%/.bazelrc.windows.local
99
# https://github.com/bazelbuild/bazel/issues/21491
1010

1111
common --lockfile_mode=off
12-
13-
# Prepare for Bazel 8. These become the default in 8.0.0
14-
common --incompatible_disallow_empty_glob
15-
common --incompatible_use_plus_in_repo_names
12+
# We need this for rust and closure targets
13+
common --enable_workspace
14+
common --noincompatible_disallow_struct_provider_syntax
1615

1716
# Ensure Windows support is accurate.
1817

@@ -30,7 +29,6 @@ build --tool_java_language_version=17
3029
build --tool_java_runtime_version=remotejdk_17
3130

3231
# We target java 11 by default
33-
3432
build --javacopt="--release 11"
3533

3634
# Require java dependencies to be used and first-order
@@ -44,7 +42,7 @@ build --javacopt="-Xep:ImpossibleNullComparison:OFF"
4442
build --nobuild_runfile_links
4543

4644
# More JS magic
47-
build --experimental_allow_unresolved_symlinks
45+
build --allow_unresolved_symlinks
4846
# Avoid a warning about directory tracking being unsound
4947
startup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1
5048

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.4.1
1+
8.0.1

py/conftest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ def get_service(driver_class, executable):
226226
if not executable:
227227
return None
228228

229+
# Make sure the executable is an absolute path
230+
executable = os.path.abspath(executable)
231+
229232
module = getattr(webdriver, driver_class.lower())
230233
service = module.service.Service(executable_path=executable)
231234

py/private/browsers.bzl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,40 +15,40 @@ headless_args = select({
1515

1616
chrome_args = select({
1717
"@selenium//common:use_pinned_linux_chrome": [
18-
"--driver-binary=$(location @linux_chromedriver//:chromedriver)",
19-
"--browser-binary=$(location @linux_chrome//:chrome-linux64/chrome)",
18+
"--driver-binary=$(rootpath @linux_chromedriver//:chromedriver)",
19+
"--browser-binary=$(rootpath @linux_chrome//:chrome-linux64/chrome)",
2020
"--browser-args=--disable-dev-shm-usage",
2121
"--browser-args=--no-sandbox",
2222
],
2323
"@selenium//common:use_pinned_macos_chrome": [
24-
"--driver-binary=$(location @mac_chromedriver//:chromedriver)",
25-
"--browser-binary=$(location @mac_chrome//:Chrome.app)/Contents/MacOS/Chrome",
24+
"--driver-binary=$(rootpath @mac_chromedriver//:chromedriver)",
25+
"--browser-binary=$(rootpath @mac_chrome//:Chrome.app)/Contents/MacOS/Chrome",
2626
],
2727
"//conditions:default": [],
2828
}) + headless_args
2929

3030
edge_args = select({
3131
"@selenium//common:use_pinned_linux_edge": [
32-
"--driver-binary=$(location @linux_edgedriver//:msedgedriver)",
33-
"--browser-binary=$(location @linux_edge//:opt/microsoft/msedge/microsoft-edge)",
32+
"--driver-binary=$(rootpath @linux_edgedriver//:msedgedriver)",
33+
"--browser-binary=$(rootpath @linux_edge//:opt/microsoft/msedge/microsoft-edge)",
3434
"--browser-args=--disable-dev-shm-usage",
3535
"--browser-args=--no-sandbox",
3636
],
3737
"@selenium//common:use_pinned_macos_edge": [
38-
"--driver-binary=$(location @mac_edgedriver//:msedgedriver)",
39-
"--browser-binary='$(location @mac_edge//:Edge.app)/Contents/MacOS/Microsoft Edge'",
38+
"--driver-binary=$(rootpath @mac_edgedriver//:msedgedriver)",
39+
"--browser-binary='$(rootpath @mac_edge//:Edge.app)/Contents/MacOS/Microsoft Edge'",
4040
],
4141
"//conditions:default": [],
4242
}) + headless_args
4343

4444
firefox_args = select({
4545
"@selenium//common:use_pinned_linux_firefox": [
46-
"--driver-binary=$(location @linux_geckodriver//:geckodriver)",
47-
"--browser-binary=$(location @linux_firefox//:firefox/firefox)",
46+
"--driver-binary=$(rootpath @linux_geckodriver//:geckodriver)",
47+
"--browser-binary=$(rootpath @linux_firefox//:firefox/firefox)",
4848
],
4949
"@selenium//common:use_pinned_macos_firefox": [
50-
"--driver-binary=$(location @mac_geckodriver//:geckodriver)",
51-
"--browser-binary=$(location @mac_firefox//:Firefox.app)/Contents/MacOS/firefox",
50+
"--driver-binary=$(rootpath @mac_geckodriver//:geckodriver)",
51+
"--browser-binary=$(rootpath @mac_firefox//:Firefox.app)/Contents/MacOS/firefox",
5252
],
5353
"//conditions:default": [],
5454
}) + headless_args

0 commit comments

Comments
 (0)