Skip to content

Commit

Permalink
Run buildifier over the tree
Browse files Browse the repository at this point in the history
The command used was:

buildifier -r -lint fix -mode fix .
  • Loading branch information
diemol committed Jun 9, 2022
1 parent 939185a commit 8b92d86
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 33 deletions.
3 changes: 1 addition & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
load("//common:browsers.bzl", "chrome_data", "firefox_data")
load("//java:browsers.bzl", "chrome_jvm_flags", "firefox_jvm_flags")
load("//java:defs.bzl", "artifact")
load("@rules_python//python:defs.bzl", "py_runtime_pair")

filegroup(
name = "license",
Expand All @@ -11,8 +12,6 @@ filegroup(
visibility = ["//visibility:public"],
)

load("@rules_python//python:defs.bzl", "py_runtime_pair")

py_runtime(
name = "py3_runtime",
interpreter_path = select({
Expand Down
8 changes: 5 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ workspace(
)

load("//common/private:env.bzl", "env")

env(
name = "python_version",
env_var=["PYTHON_VERSION"]
env_var = ["PYTHON_VERSION"],
)
load("@python_version//:defs.bzl", "PYTHON_VERSION")

load("@python_version//:defs.bzl", "PYTHON_VERSION")

register_toolchains(":py_toolchain")

Expand Down Expand Up @@ -79,8 +80,8 @@ load("@rules_python//python:pip.bzl", "pip_parse")

pip_parse(
name = "py_dev_requirements",
requirements_lock = "//py:requirements_lock.txt",
python_interpreter_target = interpreter,
requirements_lock = "//py:requirements_lock.txt",
)

load("@py_dev_requirements//:requirements.bzl", "install_deps")
Expand Down Expand Up @@ -155,6 +156,7 @@ http_archive(
sha256 = "0fad45a9bda7dc1990c47b002fd64f55041ea751fafc00cd34efb96107675778",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.5.0/rules_nodejs-5.5.0.tar.gz"],
)

load("@build_bazel_rules_nodejs//:repositories.bzl", "build_bazel_rules_nodejs_dependencies")

build_bazel_rules_nodejs_dependencies()
Expand Down
6 changes: 3 additions & 3 deletions common/private/env.bzl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
def _env_impl(rctx):
rctx.file("BUILD.bazel") # So we can refer to the defs.bzl file we're about to create
defs = ["%s = %s" % (k, repr(rctx.os.environ.get(k, "3.8"))) for k in rctx.attr.env_var]
rctx.file("defs.bzl", "\n".join(defs))
rctx.file("BUILD.bazel") # So we can refer to the defs.bzl file we're about to create
defs = ["%s = %s" % (k, repr(rctx.os.environ.get(k, "3.8"))) for k in rctx.attr.env_var]
rctx.file("defs.bzl", "\n".join(defs))

env = repository_rule(
implementation = _env_impl,
Expand Down
22 changes: 10 additions & 12 deletions common/repositories.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# This file has been generated using `bazel run scripts:pinned_browsers`

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
Expand All @@ -15,28 +14,28 @@ def pin_browsers():
sha256 = "b6d895047c8911a49d944f78f710718091957f0057344cea735096ab4a8c07d1",
build_file_content = "exports_files([\"firefox\"])",
)

dmg_archive(
name = "mac_firefox",
url = "https://ftp.mozilla.org/pub/firefox/releases/99.0/mac/en-US/Firefox%2099.0.dmg",
sha256 = "c54367d73f3d47b7f41eb5751014168a27584674b8fb2e541c05f835baccf623",
build_file_content = "exports_files([\"Firefox.app\"])",
)

http_archive(
name = "linux_geckodriver",
url = "https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz",
sha256 = "12c37f41d11ed982b7be43d02411ff2c75fb7a484e46966d000b47d1665baa88",
build_file_content = "exports_files([\"geckodriver\"])",
)

http_archive(
name = "mac_geckodriver",
url = "https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-macos.tar.gz",
sha256 = "560ba192666c1fe8796404153cfdf2d12551515601c4b3937aabcba6ee300f8c",
build_file_content = "exports_files([\"geckodriver\"])",
)

pkg_archive(
name = "mac_edge",
url = "https://officecdn-microsoft-com.akamaized.net/pr/C1297A47-86C4-4C1F-97FA-950631F94777/MacAutoupdate/MicrosoftEdge-100.0.1185.29.pkg?platform=Mac&Consent=0&channel=Stable",
Expand All @@ -46,47 +45,46 @@ def pin_browsers():
},
build_file_content = "exports_files([\"Edge.app\"])",
)

http_archive(
name = "linux_edgedriver",
url = "https://msedgedriver.azureedge.net/100.0.1185.29/edgedriver_linux64.zip",
sha256 = "07ab098a5e2bfb4c0895e6f9c778bc7495a3782a00b3eff4e758912d182d39e8",
build_file_content = "exports_files([\"msedgedriver\"])",
)

http_archive(
name = "mac_edgedriver",
url = "https://msedgedriver.azureedge.net/100.0.1185.29/edgedriver_mac64.zip",
sha256 = "4b7a624a2d9fda85b5ce34ef4857b8f4dcb93a976060069956dd4eed29101870",
build_file_content = "exports_files([\"msedgedriver\"])",
)

http_archive(
name = "linux_chrome",
url = "https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/972739/chrome-linux.zip",
sha256 = "228f8a7b4ab7bd3c43d555ba5857a8240f21fc5df96a91cc827d0ae509b01097",
build_file_content = "exports_files([\"chrome-linux\"])",
)

http_archive(
name = "mac_chrome",
url = "https://storage.googleapis.com/chromium-browser-snapshots/Mac/972739/chrome-mac.zip",
sha256 = "a9c59baa2c6c455172c1780ee3411f4b3aa0561a8ed2882d7247d6716d6ccd66",
strip_prefix = "chrome-mac",
build_file_content = "exports_files([\"Chromium.app\"])",
)

http_archive(
name = "linux_chromedriver",
url = "https://chromedriver.storage.googleapis.com/100.0.4896.60/chromedriver_linux64.zip",
sha256 = "617cd4bad5f476a8c2a764d595d808a9d6ada4a35d4f89e2af1234c6206f2d61",
build_file_content = "exports_files([\"chromedriver\"])",
)

http_archive(
name = "mac_chromedriver",
url = "https://chromedriver.storage.googleapis.com/100.0.4896.60/chromedriver_mac64.zip",
sha256 = "492bce3b556419b3fea9adbc2699b363445cdd5a74ba902cc579cd5b1c9c1160",
build_file_content = "exports_files([\"chromedriver\"])",
)

11 changes: 5 additions & 6 deletions java/src/org/openqa/selenium/bidi/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
load("//common:defs.bzl", "copy_file")
load("//java:defs.bzl", "java_library")

java_library(
Expand All @@ -10,9 +9,9 @@ java_library(
"//java/src/org/openqa/selenium/firefox:__subpackages__",
],
deps = [
"//java/src/org/openqa/selenium:core",
"//java/src/org/openqa/selenium/json",
"//java/src/org/openqa/selenium/remote",
artifact("com.google.guava:guava"),
"//java/src/org/openqa/selenium:core",
"//java/src/org/openqa/selenium/json",
"//java/src/org/openqa/selenium/remote",
artifact("com.google.guava:guava"),
],
)
)
2 changes: 1 addition & 1 deletion java/src/org/openqa/selenium/devtools/versions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CDP_VERSIONS = [
"v85", # Required by Firefox
"v100",
"v101",
"v102"
"v102",
]

CDP_DEPS = ["//java/src/org/openqa/selenium/devtools/%s" % v for v in CDP_VERSIONS]
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ java_library(
"//java/src/org/openqa/selenium/grid/distributor",
"//java/src/org/openqa/selenium/grid/distributor/config",
"//java/src/org/openqa/selenium/grid/distributor/selector",
"//java/src/org/openqa/selenium/grid/jmx",
"//java/src/org/openqa/selenium/grid/log",
"//java/src/org/openqa/selenium/grid/node",
"//java/src/org/openqa/selenium/grid/node/remote",
Expand All @@ -29,7 +30,6 @@ java_library(
"//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/grid/jmx",
artifact("com.google.guava:guava"),
artifact("dev.failsafe:failsafe"),
],
Expand Down
6 changes: 2 additions & 4 deletions java/test/org/openqa/selenium/bidi/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
load("//java:defs.bzl", "java_library", "java_selenium_test_suite")
load("//java:defs.bzl", "java_selenium_test_suite")

java_selenium_test_suite(
name = "large-tests",
Expand All @@ -12,20 +12,18 @@ java_selenium_test_suite(
"selenium-remote",
],
deps = [
"//java/src/org/openqa/selenium/grid/security",
"//java/src/org/openqa/selenium/firefox",
"//java/src/org/openqa/selenium/grid/security",
"//java/src/org/openqa/selenium/json",
"//java/src/org/openqa/selenium/remote",
"//java/src/org/openqa/selenium/support",
"//java/test/org/openqa/selenium/environment",
"//java/test/org/openqa/selenium/testing:annotations",
"//java/test/org/openqa/selenium/testing:test-base",
"//java/test/org/openqa/selenium/testing/drivers",

artifact("com.google.guava:guava"),
artifact("junit:junit"),
artifact("org.assertj:assertj-core"),
artifact("org.hamcrest:hamcrest"),
],
)

1 change: 0 additions & 1 deletion py/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ load("@py_dev_requirements//:requirements.bzl", "requirement")
load("//common:defs.bzl", "copy_file")
load("//py:defs.bzl", "py_test_suite")
load("//py/private:browsers.bzl", "BROWSERS")

load("@rules_python//python:pip.bzl", "compile_pip_requirements")

compile_pip_requirements(
Expand Down

0 comments on commit 8b92d86

Please sign in to comment.