From 77428ec7e39f26e31b438372ab2bc2f90f42fa5d Mon Sep 17 00:00:00 2001 From: Yun Peng Date: Fri, 20 Dec 2024 22:12:54 +0100 Subject: [PATCH] Migrate to Bzlmod (#478) * Migrate to bzlmod * More polish * Minor fix * Simplify repo name * Re-enable sauceconnect * Fix bazelrc * Minor fix * rm resolved_deps.py * Register scalca test toolchain * Register scalca test toolchain * Register scalca test toolchain * Fix maven targets * Fix junit * Add scala deps * Fix maven coords * Fix maven coords * Use the correct scala_test setup * Fix windows build * Update presubmit configs * Fix windows * Fix lockfile on windows * Fix lockfile on windows * Run buildifier * Re-organize bazel_dep * Implement version selection for brower dependencies * Remove WORKSPACE * Rename version to install --- .bazelci/presubmit.yml | 5 +- .bazelrc | 2 + .bazelversion | 1 + .gitignore | 1 + BUILD.bazel | 17 +- MODULE.bazel | 100 +++++++ README.md | 145 +--------- WORKSPACE | 131 --------- build_files/com_github_urllib3.BUILD | 27 -- build_files/org_seleniumhq_py.BUILD | 28 -- go.mod | 10 + go.sum | 114 ++++++++ go/bazel/bazel.go | 2 +- go/webdriver/webdriver_test.go | 4 +- java/com/google/testing/bazel/BUILD.bazel | 2 +- java/com/google/testing/bazel/Bazel.java | 2 +- java/com/google/testing/web/BUILD.bazel | 4 +- javatests/com/google/testing/web/BUILD.bazel | 4 +- requirements.in | 1 + requirements_lock.txt | 71 +++++ requirements_lock_windows.txt | 144 ++++++++++ scalatests/com/google/testing/web/BUILD.bazel | 4 +- testing/web/BUILD.bazel | 4 +- web/BUILD.bazel | 35 --- web/extension.bzl | 84 ++++++ web/go_repositories.bzl | 102 ------- web/internal/platform_archive.bzl | 4 +- web/internal/platform_metadata.bzl | 4 +- web/java_repositories.bzl | 259 ------------------ web/py_repositories.bzl | 69 ----- web/repositories.bzl | 74 ----- web/versioned/browsers-0.3.1.bzl | 23 +- web/versioned/browsers-0.3.2.bzl | 23 +- web/versioned/browsers-0.3.3.bzl | 23 +- web/versioned/browsers-0.3.4.bzl | 23 +- 35 files changed, 587 insertions(+), 959 deletions(-) create mode 100644 .bazelversion create mode 100644 MODULE.bazel delete mode 100644 WORKSPACE delete mode 100644 build_files/com_github_urllib3.BUILD delete mode 100644 build_files/org_seleniumhq_py.BUILD create mode 100644 go.mod create mode 100644 go.sum create mode 100644 requirements.in create mode 100644 requirements_lock.txt create mode 100644 requirements_lock_windows.txt create mode 100644 web/extension.bzl delete mode 100644 web/go_repositories.bzl delete mode 100644 web/java_repositories.bzl delete mode 100644 web/py_repositories.bzl delete mode 100644 web/repositories.bzl diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index aaa8ee81..0d2235f2 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -1,15 +1,13 @@ --- platforms: - ubuntu1804: + ubuntu2204: build_targets: - "//..." test_flags: - "--test_tag_filters=-noci,-external,-native,-sauce" - - "--test_output=streamed" test_targets: - "//..." macos: - sauce: false build_targets: - "//..." test_flags: @@ -17,7 +15,6 @@ platforms: test_targets: - "//..." windows: - sauce: false build_flags: - "--enable_runfiles" build_targets: diff --git a/.bazelrc b/.bazelrc index c86a6fef..86cc0825 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,3 +1,5 @@ +common --noenable_workspace + # For running sauce-based configs. test --test_env=SAUCE_USERNAME test --test_env=SAUCE_ACCESS_KEY diff --git a/.bazelversion b/.bazelversion new file mode 100644 index 00000000..815da58b --- /dev/null +++ b/.bazelversion @@ -0,0 +1 @@ +7.4.1 diff --git a/.gitignore b/.gitignore index 0160f699..e421b907 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ bazel-* *.pyc .vs/* user.bazelrc +MODULE.bazel.lock .idea/ dist/ diff --git a/BUILD.bazel b/BUILD.bazel index 0e15ea15..af1d9d52 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -15,7 +15,7 @@ ################################################################################ # load("@bazel_gazelle//:def.bzl", "gazelle") -load("@io_bazel_rules_scala//scala:scala.bzl", "setup_scala_testing_toolchain") +load("@python_versions//3.11:defs.bzl", "compile_pip_requirements") licenses(["notice"]) # Apache 2.0 @@ -26,13 +26,10 @@ gazelle( prefix = "github.com/bazelbuild/rules_webtesting", ) -setup_scala_testing_toolchain( - name = "scalatest_toolchain", - scalatest_classpath = [ - "@maven//:org_scalatest_scalatest_wordspec_2_12", - "@io_bazel_rules_scala_scalactic", - "@io_bazel_rules_scala_scalatest", - "@io_bazel_rules_scala_scalatest_compatible", - "@io_bazel_rules_scala_scalatest_core", - ], +compile_pip_requirements( + name = "requirements", + requirements_in = "requirements.in", + requirements_txt = "requirements_lock.txt", + requirements_windows = "requirements_lock_windows.txt", ) + diff --git a/MODULE.bazel b/MODULE.bazel new file mode 100644 index 00000000..94966961 --- /dev/null +++ b/MODULE.bazel @@ -0,0 +1,100 @@ +module( + name = "rules_webtesting", + version = "0.4.0", +) + +bazel_dep(name = "bazel_skylib", version = "1.7.1") +bazel_dep(name = "platforms", version = "0.0.10") + +##### Go dependencies ##### +bazel_dep(name = "rules_go", version = "0.51.0-rc1", repo_name = "io_bazel_rules_go") +bazel_dep(name = "gazelle", version = "0.40.0", repo_name = "bazel_gazelle") + +go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps") +go_deps.from_file(go_mod = "//:go.mod") + +# All *direct* Go dependencies of the module have to be listed explicitly. +use_repo( + go_deps, + "com_github_gorilla_mux", + "com_github_tebeka_selenium", +) + +##### Java dependencies ##### +bazel_dep(name = "rules_jvm_external", version = "6.6") + +maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") +maven.install( + artifacts = [ + "com.google.guava:guava:33.2.1-jre", + "org.seleniumhq.selenium:selenium-remote-driver:4.27.0", + "org.seleniumhq.selenium:selenium-api:4.27.0", + "junit:junit:4.13.2", + ], +) +use_repo(maven, "maven") + +##### Python dependencies ##### +bazel_dep(name = "rules_python", version = "1.0.0") + +python = use_extension("@rules_python//python/extensions:python.bzl", "python") +python.toolchain( + is_default = True, + python_version = "3.11", +) +use_repo(python, "python_3_11", "python_versions") + +pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip") +pip.parse( + hub_name = "rules_webtesting_py_deps", + python_version = "3.11", + requirements_lock = "//:requirements_lock.txt", + requirements_windows = "requirements_lock_windows.txt", +) +use_repo(pip, "rules_webtesting_py_deps") + +##### Scala dependencies ##### +bazel_dep(name = "rules_scala", repo_name = "io_bazel_rules_scala") + +# TODO: Switch to a release version once it's available in BCR. +# Otherwise, the root module has to declare the same override. +git_override( + module_name = "rules_scala", + commit = "7fb52c7fc2ef8f7670feb73c0a9869715bdc40b8", + remote = "https://github.com/mbland/rules_scala", +) + +scala_deps = use_extension( + "@io_bazel_rules_scala//scala/extensions:deps.bzl", + "scala_deps", +) +scala_deps.settings( + fetch_sources = True, +) +scala_deps.toolchains( + scalatest = True, +) + +##### Browsers dependencies ##### +browser_repositories = use_extension("//web:extension.bzl", "browser_repositories_extension") +browser_repositories.install(version = "0.3.3") +use_repo( + browser_repositories, + "com_saucelabs_sauce_connect_linux_x64", + "com_saucelabs_sauce_connect_macos_x64", + "com_saucelabs_sauce_connect_windows_x64", + "org_chromium_chromedriver_linux_x64", + "org_chromium_chromedriver_macos_arm64", + "org_chromium_chromedriver_macos_x64", + "org_chromium_chromedriver_windows_x64", + "org_chromium_chromium_linux_x64", + "org_chromium_chromium_macos_arm64", # Only available in 0.3.3 + "org_chromium_chromium_macos_x64", + "org_chromium_chromium_windows_x64", + "org_mozilla_firefox_linux_x64", + "org_mozilla_firefox_macos_arm64", + "org_mozilla_firefox_macos_x64", + "org_mozilla_geckodriver_linux_x64", + "org_mozilla_geckodriver_macos_arm64", + "org_mozilla_geckodriver_macos_x64", +) diff --git a/README.md b/README.md index 6fe6e3bd..adf6569c 100644 --- a/README.md +++ b/README.md @@ -7,145 +7,10 @@ WebDriver. ## Configure your Bazel project -For all languages, you need to add the following to your WORKSPACE file: +For all languages, you need to add the following to your MODULE.bazel file: ```bzl -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -http_archive( - name = "io_bazel_rules_webtesting", - sha256 = "", - urls = [ - "https://github.com/bazelbuild/rules_webtesting/releases/download//rules_webtesting.tar.gz", - ], -) - -load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories") - -web_test_repositories() -``` - -We maintain predefined versioned browsers in -`@io_bazel_rules_webtesting//web/versioned:browsers-.bzl` that can be -referenced from `@io_bazel_rules_webtesting//browsers`. Note: these versions in -these files are not locked in until the corresponding release has been created. - -To use, add the following to your WORKSPACE file: - -```bzl -load("@io_bazel_rules_webtesting//web/versioned:browsers-.bzl", "browser_repositories") - -browser_repositories(chromium=True, firefox=True) -``` - -Then you should add the appropriate dependencies depending on what language you -are writing your tests in: - -### Java - -```bzl -load("@io_bazel_rules_webtesting//web:java_repositories.bzl", "java_repositories") - -java_repositories() -``` - -#### Using `rules_jvm_external`? - -If you're using `rules_jvm_external` to manage your dependencies, you can add -the required artifacts directly to your `maven_install` instead of using -`java_repositories`. - -```bzl -load("@io_bazel_rules_webtesting//web:java_repositories.bzl", "RULES_WEBTESTING_ARTIFACTS") - -maven_install( - artifacts = [ - # Your artifacts - ] + RULES_WEBTESTING_ARTIFACTS, - # Enabling compatability support is required. - generate_compat_repositories = True, -) -``` - -### Scala - -```bzl -load("@io_bazel_rules_webtesting//web:java_repositories.bzl", "java_repositories") - -java_repositories() - -rule_scala_version = "e4560ac332e9da731c1e50a76af2579c55836a5c" - -http_archive( - name = "io_bazel_rules_scala", - sha256 = "ccf19e8f966022eaaca64da559c6140b23409829cb315f2eff5dc3e757fb6ad8", - strip_prefix = "rules_scala-%s" % rules_scala_version, - type = "zip", - url = "https://github.com/bazelbuild/rules_scala/archive/%s.zip" % rules_scala_version, -) - -# Stores Scala version and other configuration -# 2.12 is a default version, other versions can be use by passing them explicitly: -# scala_config(scala_version = "2.11.12") -load("@io_bazel_rules_scala//:scala_config.bzl", "scala_config") -scala_config() - -load("@io_bazel_rules_scala//scala:scala.bzl", "scala_repositories") -scala_repositories() - -load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") -rules_proto_dependencies() -rules_proto_toolchains() - -load("@io_bazel_rules_scala//scala:toolchains.bzl", "scala_register_toolchains") -scala_register_toolchains() - -# optional: setup ScalaTest toolchain and dependencies -load("@io_bazel_rules_scala//testing:scalatest.bzl", "scalatest_repositories", "scalatest_toolchain") -scalatest_repositories() -scalatest_toolchain() -``` - -### Python - -```bzl -load("@io_bazel_rules_webtesting//web:py_repositories.bzl", "py_repositories") - -py_repositories() -``` - -### Go - -```bzl -http_archive( - name = "io_bazel_rules_go", - sha256 = "b7a62250a3a73277ade0ce306d22f122365b513f5402222403e507f2f997d421", - urls = [ - "https://github.com/bazelbuild/rules_go/releases/download/0.16.3/rules_go-0.16.3.tar.gz", - ], -) - -http_archive( - name = "bazel_gazelle", - sha256 = "6e875ab4b6bf64a38c352887760f21203ab054676d9c1b274963907e0768740d", - urls = [ - "https://github.com/bazelbuild/bazel-gazelle/releases/download/0.15.0/bazel-gazelle-0.15.0.tar.gz", - ], -) - -load("@io_bazel_rules_go//go:def.bzl", "go_register_toolchains", "go_rules_dependencies") - -go_rules_dependencies() - -go_register_toolchains() - -load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") - -gazelle_dependencies() - -load("@io_bazel_rules_webtesting//web:go_repositories.bzl", "go_repositories") - -go_repositories() +bazel_dep(name = "rules_webtesting", version = "0.4.0") ``` ## Write your tests @@ -235,15 +100,15 @@ In your BUILD files, load the correct language specific build rule and create a test target using it: ```bzl -load("@io_bazel_rules_webtesting//web:py.bzl", "py_web_test_suite") +load("@rules_webtesting//web:py.bzl", "py_web_test_suite") py_web_test_suite( name = "browser_test", srcs = ["browser_test.py"], browsers = [ - "@io_bazel_rules_webtesting//browsers:chromium-local", + "@rules_webtesting//browsers:chromium-local", ], local = True, - deps = ["@io_bazel_rules_webtesting//testing/web"], + deps = ["@rules_webtesting//testing/web"], ) ``` diff --git a/WORKSPACE b/WORKSPACE deleted file mode 100644 index 803cb3c1..00000000 --- a/WORKSPACE +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright 2016 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ -# -workspace(name = "io_bazel_rules_webtesting") - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -load("//web:repositories.bzl", "web_test_repositories") - -web_test_repositories() - -# NOTE: URLs are mirrored by an asynchronous review process. They must -# be greppable for that to happen. It's OK to submit broken mirror -# URLs, so long as they're correctly formatted. Bazel's downloader -# has fast failover. - -http_archive( - name = "io_bazel_rules_go", - sha256 = "278b7ff5a826f3dc10f04feaf0b70d48b68748ccd512d7f98bf442077f043fe3", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", - "https://github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", - ], -) - -load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") - -go_rules_dependencies() - -go_register_toolchains(version = "1.20.5") - -http_archive( - name = "bazel_gazelle", - sha256 = "29218f8e0cebe583643cbf93cae6f971be8a2484cdcfa1e45057658df8d54002", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.32.0/bazel-gazelle-v0.32.0.tar.gz", - "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.32.0/bazel-gazelle-v0.32.0.tar.gz", - ], -) - -load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") - -gazelle_dependencies() - -load("//web/versioned:browsers-0.3.3.bzl", "browser_repositories") - -browser_repositories( - chromium = True, - firefox = True, - sauce = True, -) - -load("//web:go_repositories.bzl", "go_repositories", "go_internal_repositories") - -go_repositories() - -go_internal_repositories() - -load("//web:java_repositories.bzl", "java_repositories") - -java_repositories() - -load("//web:py_repositories.bzl", "py_repositories") - -py_repositories() - -http_archive( - name = "io_bazel_rules_scala", - sha256 = "3b00fa0b243b04565abb17d3839a5f4fa6cc2cac571f6db9f83c1982ba1e19e5", - strip_prefix = "rules_scala-6.5.0", - url = "https://github.com/bazelbuild/rules_scala/releases/download/v6.5.0/rules_scala-v6.5.0.tar.gz", -) - -load("@io_bazel_rules_scala//:scala_config.bzl", "scala_config") - -scala_config() - -load("@io_bazel_rules_scala//scala:scala.bzl", "rules_scala_setup", "rules_scala_toolchain_deps_repositories") - -rules_scala_setup() -rules_scala_toolchain_deps_repositories(fetch_sources = True) - -load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") - -rules_proto_dependencies() -rules_proto_toolchains() - -load("@io_bazel_rules_scala//scala:toolchains.bzl", "scala_register_toolchains") - -scala_register_toolchains() - -load("@io_bazel_rules_scala//testing:scalatest.bzl", "scalatest_repositories", "scalatest_toolchain") - -scalatest_repositories() - -RULES_JVM_EXTERNAL_TAG = "5.3" -RULES_JVM_EXTERNAL_SHA ="d31e369b854322ca5098ea12c69d7175ded971435e55c18dd9dd5f29cc5249ac" - -http_archive( - name = "rules_jvm_external", - strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG, - sha256 = RULES_JVM_EXTERNAL_SHA, - url = "https://github.com/bazelbuild/rules_jvm_external/releases/download/%s/rules_jvm_external-%s.tar.gz" % (RULES_JVM_EXTERNAL_TAG, RULES_JVM_EXTERNAL_TAG) -) - -load("@rules_jvm_external//:defs.bzl", "maven_install") - -maven_install( - artifacts = [ - "org.scalatest:scalatest-wordspec_2.12:3.2.9", - ], - repositories = [ - "https://maven.google.com", - "https://repo.maven.apache.org/maven2" - ], -) - -# Register custom scalatest toolchain to include the required wordspec dependency -register_toolchains('//:scalatest_toolchain') diff --git a/build_files/com_github_urllib3.BUILD b/build_files/com_github_urllib3.BUILD deleted file mode 100644 index 9481ba3d..00000000 --- a/build_files/com_github_urllib3.BUILD +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 2018 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ -# -licenses(["notice"]) # MIT-style license - -py_library( - name = "com_github_urllib3", - srcs = glob(["**/*.py"]), - data = glob( - ["**/*"], - exclude = ["**/*.py"], - ), - visibility = ["//visibility:public"], -) diff --git a/build_files/org_seleniumhq_py.BUILD b/build_files/org_seleniumhq_py.BUILD deleted file mode 100644 index 36e2f2b6..00000000 --- a/build_files/org_seleniumhq_py.BUILD +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2016 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ -# -licenses(["notice"]) # Apache 2 - -py_library( - name = "org_seleniumhq_py", - srcs = glob(["**/*.py"]), - data = glob( - ["**/*"], - exclude = ["**/*.py"], - ), - visibility = ["//visibility:public"], - deps = ["@com_github_urllib3"], -) diff --git a/go.mod b/go.mod new file mode 100644 index 00000000..8c2aa93c --- /dev/null +++ b/go.mod @@ -0,0 +1,10 @@ +module github.com/bazelbuild/rules_webtesting + +go 1.17 + +require ( + github.com/gorilla/mux v1.8.1 + github.com/tebeka/selenium v0.9.9 +) + +require github.com/blang/semver v3.5.1+incompatible // indirect diff --git a/go.sum b/go.sum new file mode 100644 index 00000000..e4f19c45 --- /dev/null +++ b/go.sum @@ -0,0 +1,114 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.41.0/go.mod h1:OauMR7DV8fzvZIl2qg6rkaIhD/vmgk4iwEw/h6ercmg= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e h1:4ZrkT/RzpnROylmoQL57iVUL57wGKTR5O6KpVnbm2tA= +github.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e/go.mod h1:uw9h2sd4WWHOPdJ13MQpwK5qYWKYDumDqxWWIknEQ+k= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-github/v27 v27.0.4/go.mod h1:/0Gr8pJ55COkmv+S/yPKCczSkUPIM/LnFyubufRNIS0= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/tebeka/selenium v0.9.9 h1:cNziB+etNgyH/7KlNI7RMC1ua5aH1+5wUlFQyzeMh+w= +github.com/tebeka/selenium v0.9.9/go.mod h1:5Fr8+pUvU6B1OiPfkdCKdXZyr5znvVkxuPd0NOdZCQc= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624190245-7f2218787638/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190626174449-989357319d63/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/go/bazel/bazel.go b/go/bazel/bazel.go index 08171d4f..1c71ff1a 100644 --- a/go/bazel/bazel.go +++ b/go/bazel/bazel.go @@ -28,7 +28,7 @@ import ( ) // DefaultWorkspace is the name of the default Bazel workspace. -var DefaultWorkspace = "io_bazel_rules_webtesting" +var DefaultWorkspace = "_main" // Runfile returns an absolute path to the specified file in the runfiles directory of the running target. // It searches the current working directory, RunfilesPath() directory, and RunfilesPath()/TestWorkspace(). diff --git a/go/webdriver/webdriver_test.go b/go/webdriver/webdriver_test.go index 036af3ee..6c3f51b2 100644 --- a/go/webdriver/webdriver_test.go +++ b/go/webdriver/webdriver_test.go @@ -19,9 +19,9 @@ import ( "fmt" "log" "net/http" - "path/filepath" "net/url" "os" + "path/filepath" "strings" "testing" "time" @@ -43,7 +43,7 @@ func TestMain(m *testing.M) { // Note: We resolve to a testdata file first and then retrieve compute the directory. // This is necessary in order to support running this test on Windows. The runfile manifest // only contains mappings for files, so there is no mapping for just the `testdata/` directory. - resolved_file, err := bazel.Runfile("io_bazel_rules_webtesting/testdata/BUILD.bazel") + resolved_file, err := bazel.Runfile("rules_webtesting/testdata/BUILD.bazel") if err != nil { log.Fatal(err) } diff --git a/java/com/google/testing/bazel/BUILD.bazel b/java/com/google/testing/bazel/BUILD.bazel index 78188686..bfe0d8e1 100644 --- a/java/com/google/testing/bazel/BUILD.bazel +++ b/java/com/google/testing/bazel/BUILD.bazel @@ -20,5 +20,5 @@ java_library( name = "bazel", srcs = glob(["*.java"]), visibility = ["//visibility:public"], - deps = ["@com_google_guava_guava"], + deps = ["@maven//:com_google_guava_guava",], ) diff --git a/java/com/google/testing/bazel/Bazel.java b/java/com/google/testing/bazel/Bazel.java index f8761ead..a7849f6c 100644 --- a/java/com/google/testing/bazel/Bazel.java +++ b/java/com/google/testing/bazel/Bazel.java @@ -32,7 +32,7 @@ public class Bazel { private static final String TEST_SRCDIR = "TEST_SRCDIR"; private static final String TEST_TMPDIR = "TEST_TMPDIR"; private static final String TEST_WORKSPACE = "TEST_WORKSPACE"; - private static final String DEFAULT_WORKSPACE = "io_bazel_rules_webtesting"; + private static final String DEFAULT_WORKSPACE = "_main"; private final Path runfilesDir; private final Optional testTmpDir; diff --git a/java/com/google/testing/web/BUILD.bazel b/java/com/google/testing/web/BUILD.bazel index bda2a7b9..5b9dc2bc 100644 --- a/java/com/google/testing/web/BUILD.bazel +++ b/java/com/google/testing/web/BUILD.bazel @@ -22,7 +22,7 @@ java_library( srcs = glob(["*.java"]), visibility = ["//visibility:public"], deps = [ - "@org_seleniumhq_selenium_selenium_api", - "@org_seleniumhq_selenium_selenium_remote_driver", + "@maven//:org_seleniumhq_selenium_selenium_api", + "@maven//:org_seleniumhq_selenium_selenium_remote_driver", ], ) diff --git a/javatests/com/google/testing/web/BUILD.bazel b/javatests/com/google/testing/web/BUILD.bazel index c1cefdc3..7499d4c4 100644 --- a/javatests/com/google/testing/web/BUILD.bazel +++ b/javatests/com/google/testing/web/BUILD.bazel @@ -29,7 +29,7 @@ java_web_test_suite( ], deps = [ "//java/com/google/testing/web", - "@junit_junit", - "@org_seleniumhq_selenium_selenium_api", + "@maven//:junit_junit", + "@maven//:org_seleniumhq_selenium_selenium_api", ], ) diff --git a/requirements.in b/requirements.in new file mode 100644 index 00000000..72e055f5 --- /dev/null +++ b/requirements.in @@ -0,0 +1 @@ +selenium==4.27.1 diff --git a/requirements_lock.txt b/requirements_lock.txt new file mode 100644 index 00000000..423b3ab0 --- /dev/null +++ b/requirements_lock.txt @@ -0,0 +1,71 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# bazel run //:requirements.update +# +attrs==24.2.0 \ + --hash=sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346 \ + --hash=sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2 + # via + # outcome + # trio +certifi==2024.8.30 \ + --hash=sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8 \ + --hash=sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9 + # via selenium +h11==0.14.0 \ + --hash=sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d \ + --hash=sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761 + # via wsproto +idna==3.10 \ + --hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \ + --hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3 + # via trio +outcome==1.3.0.post0 \ + --hash=sha256:9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8 \ + --hash=sha256:e771c5ce06d1415e356078d3bdd68523f284b4ce5419828922b6871e65eda82b + # via trio +pysocks==1.7.1 \ + --hash=sha256:08e69f092cc6dbe92a0fdd16eeb9b9ffbc13cadfe5ca4c7bd92ffb078b293299 \ + --hash=sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5 \ + --hash=sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0 + # via urllib3 +selenium==4.27.1 \ + --hash=sha256:5296c425a75ff1b44d0d5199042b36a6d1ef76c04fb775b97b40be739a9caae2 \ + --hash=sha256:b89b1f62b5cfe8025868556fe82360d6b649d464f75d2655cb966c8f8447ea18 + # via -r requirements.in +sniffio==1.3.1 \ + --hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 \ + --hash=sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc + # via trio +sortedcontainers==2.4.0 \ + --hash=sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88 \ + --hash=sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0 + # via trio +trio==0.27.0 \ + --hash=sha256:1dcc95ab1726b2da054afea8fd761af74bad79bd52381b84eae408e983c76831 \ + --hash=sha256:68eabbcf8f457d925df62da780eff15ff5dc68fd6b367e2dde59f7aaf2a0b884 + # via + # selenium + # trio-websocket +trio-websocket==0.11.1 \ + --hash=sha256:18c11793647703c158b1f6e62de638acada927344d534e3c7628eedcb746839f \ + --hash=sha256:520d046b0d030cf970b8b2b2e00c4c2245b3807853ecd44214acd33d74581638 + # via selenium +typing-extensions==4.12.2 \ + --hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \ + --hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8 + # via selenium +urllib3[socks]==2.2.3 \ + --hash=sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac \ + --hash=sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9 + # via selenium +websocket-client==1.8.0 \ + --hash=sha256:17b44cc997f5c498e809b22cdf2d9c7a9e71c02c8cc2b6c56e7c2d1239bfa526 \ + --hash=sha256:3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da + # via selenium +wsproto==1.2.0 \ + --hash=sha256:ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065 \ + --hash=sha256:b9acddd652b585d75b20477888c56642fdade28bdfd3579aa24a4d2c037dd736 + # via trio-websocket diff --git a/requirements_lock_windows.txt b/requirements_lock_windows.txt new file mode 100644 index 00000000..d94eee74 --- /dev/null +++ b/requirements_lock_windows.txt @@ -0,0 +1,144 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# bazel run //:requirements.update +# +attrs==24.2.0 \ + --hash=sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346 \ + --hash=sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2 + # via + # outcome + # trio +certifi==2024.8.30 \ + --hash=sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8 \ + --hash=sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9 + # via selenium +cffi==1.17.1 \ + --hash=sha256:045d61c734659cc045141be4bae381a41d89b741f795af1dd018bfb532fd0df8 \ + --hash=sha256:0984a4925a435b1da406122d4d7968dd861c1385afe3b45ba82b750f229811e2 \ + --hash=sha256:0e2b1fac190ae3ebfe37b979cc1ce69c81f4e4fe5746bb401dca63a9062cdaf1 \ + --hash=sha256:0f048dcf80db46f0098ccac01132761580d28e28bc0f78ae0d58048063317e15 \ + --hash=sha256:1257bdabf294dceb59f5e70c64a3e2f462c30c7ad68092d01bbbfb1c16b1ba36 \ + --hash=sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824 \ + --hash=sha256:1d599671f396c4723d016dbddb72fe8e0397082b0a77a4fab8028923bec050e8 \ + --hash=sha256:28b16024becceed8c6dfbc75629e27788d8a3f9030691a1dbf9821a128b22c36 \ + --hash=sha256:2bb1a08b8008b281856e5971307cc386a8e9c5b625ac297e853d36da6efe9c17 \ + --hash=sha256:30c5e0cb5ae493c04c8b42916e52ca38079f1b235c2f8ae5f4527b963c401caf \ + --hash=sha256:31000ec67d4221a71bd3f67df918b1f88f676f1c3b535a7eb473255fdc0b83fc \ + --hash=sha256:386c8bf53c502fff58903061338ce4f4950cbdcb23e2902d86c0f722b786bbe3 \ + --hash=sha256:3edc8d958eb099c634dace3c7e16560ae474aa3803a5df240542b305d14e14ed \ + --hash=sha256:45398b671ac6d70e67da8e4224a065cec6a93541bb7aebe1b198a61b58c7b702 \ + --hash=sha256:46bf43160c1a35f7ec506d254e5c890f3c03648a4dbac12d624e4490a7046cd1 \ + --hash=sha256:4ceb10419a9adf4460ea14cfd6bc43d08701f0835e979bf821052f1805850fe8 \ + --hash=sha256:51392eae71afec0d0c8fb1a53b204dbb3bcabcb3c9b807eedf3e1e6ccf2de903 \ + --hash=sha256:5da5719280082ac6bd9aa7becb3938dc9f9cbd57fac7d2871717b1feb0902ab6 \ + --hash=sha256:610faea79c43e44c71e1ec53a554553fa22321b65fae24889706c0a84d4ad86d \ + --hash=sha256:636062ea65bd0195bc012fea9321aca499c0504409f413dc88af450b57ffd03b \ + --hash=sha256:6883e737d7d9e4899a8a695e00ec36bd4e5e4f18fabe0aca0efe0a4b44cdb13e \ + --hash=sha256:6b8b4a92e1c65048ff98cfe1f735ef8f1ceb72e3d5f0c25fdb12087a23da22be \ + --hash=sha256:6f17be4345073b0a7b8ea599688f692ac3ef23ce28e5df79c04de519dbc4912c \ + --hash=sha256:706510fe141c86a69c8ddc029c7910003a17353970cff3b904ff0686a5927683 \ + --hash=sha256:72e72408cad3d5419375fc87d289076ee319835bdfa2caad331e377589aebba9 \ + --hash=sha256:733e99bc2df47476e3848417c5a4540522f234dfd4ef3ab7fafdf555b082ec0c \ + --hash=sha256:7596d6620d3fa590f677e9ee430df2958d2d6d6de2feeae5b20e82c00b76fbf8 \ + --hash=sha256:78122be759c3f8a014ce010908ae03364d00a1f81ab5c7f4a7a5120607ea56e1 \ + --hash=sha256:805b4371bf7197c329fcb3ead37e710d1bca9da5d583f5073b799d5c5bd1eee4 \ + --hash=sha256:85a950a4ac9c359340d5963966e3e0a94a676bd6245a4b55bc43949eee26a655 \ + --hash=sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67 \ + --hash=sha256:9755e4345d1ec879e3849e62222a18c7174d65a6a92d5b346b1863912168b595 \ + --hash=sha256:98e3969bcff97cae1b2def8ba499ea3d6f31ddfdb7635374834cf89a1a08ecf0 \ + --hash=sha256:a08d7e755f8ed21095a310a693525137cfe756ce62d066e53f502a83dc550f65 \ + --hash=sha256:a1ed2dd2972641495a3ec98445e09766f077aee98a1c896dcb4ad0d303628e41 \ + --hash=sha256:a24ed04c8ffd54b0729c07cee15a81d964e6fee0e3d4d342a27b020d22959dc6 \ + --hash=sha256:a45e3c6913c5b87b3ff120dcdc03f6131fa0065027d0ed7ee6190736a74cd401 \ + --hash=sha256:a9b15d491f3ad5d692e11f6b71f7857e7835eb677955c00cc0aefcd0669adaf6 \ + --hash=sha256:ad9413ccdeda48c5afdae7e4fa2192157e991ff761e7ab8fdd8926f40b160cc3 \ + --hash=sha256:b2ab587605f4ba0bf81dc0cb08a41bd1c0a5906bd59243d56bad7668a6fc6c16 \ + --hash=sha256:b62ce867176a75d03a665bad002af8e6d54644fad99a3c70905c543130e39d93 \ + --hash=sha256:c03e868a0b3bc35839ba98e74211ed2b05d2119be4e8a0f224fba9384f1fe02e \ + --hash=sha256:c59d6e989d07460165cc5ad3c61f9fd8f1b4796eacbd81cee78957842b834af4 \ + --hash=sha256:c7eac2ef9b63c79431bc4b25f1cd649d7f061a28808cbc6c47b534bd789ef964 \ + --hash=sha256:c9c3d058ebabb74db66e431095118094d06abf53284d9c81f27300d0e0d8bc7c \ + --hash=sha256:ca74b8dbe6e8e8263c0ffd60277de77dcee6c837a3d0881d8c1ead7268c9e576 \ + --hash=sha256:caaf0640ef5f5517f49bc275eca1406b0ffa6aa184892812030f04c2abf589a0 \ + --hash=sha256:cdf5ce3acdfd1661132f2a9c19cac174758dc2352bfe37d98aa7512c6b7178b3 \ + --hash=sha256:d016c76bdd850f3c626af19b0542c9677ba156e4ee4fccfdd7848803533ef662 \ + --hash=sha256:d01b12eeeb4427d3110de311e1774046ad344f5b1a7403101878976ecd7a10f3 \ + --hash=sha256:d63afe322132c194cf832bfec0dc69a99fb9bb6bbd550f161a49e9e855cc78ff \ + --hash=sha256:da95af8214998d77a98cc14e3a3bd00aa191526343078b530ceb0bd710fb48a5 \ + --hash=sha256:dd398dbc6773384a17fe0d3e7eeb8d1a21c2200473ee6806bb5e6a8e62bb73dd \ + --hash=sha256:de2ea4b5833625383e464549fec1bc395c1bdeeb5f25c4a3a82b5a8c756ec22f \ + --hash=sha256:de55b766c7aa2e2a3092c51e0483d700341182f08e67c63630d5b6f200bb28e5 \ + --hash=sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14 \ + --hash=sha256:e03eab0a8677fa80d646b5ddece1cbeaf556c313dcfac435ba11f107ba117b5d \ + --hash=sha256:e221cf152cff04059d011ee126477f0d9588303eb57e88923578ace7baad17f9 \ + --hash=sha256:e31ae45bc2e29f6b2abd0de1cc3b9d5205aa847cafaecb8af1476a609a2f6eb7 \ + --hash=sha256:edae79245293e15384b51f88b00613ba9f7198016a5948b5dddf4917d4d26382 \ + --hash=sha256:f1e22e8c4419538cb197e4dd60acc919d7696e5ef98ee4da4e01d3f8cfa4cc5a \ + --hash=sha256:f3a2b4222ce6b60e2e8b337bb9596923045681d71e5a082783484d845390938e \ + --hash=sha256:f6a16c31041f09ead72d69f583767292f750d24913dadacf5756b966aacb3f1a \ + --hash=sha256:f75c7ab1f9e4aca5414ed4d8e5c0e303a34f4421f8a0d47a4d019ceff0ab6af4 \ + --hash=sha256:f79fc4fc25f1c8698ff97788206bb3c2598949bfe0fef03d299eb1b5356ada99 \ + --hash=sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87 \ + --hash=sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b + # via trio +h11==0.14.0 \ + --hash=sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d \ + --hash=sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761 + # via wsproto +idna==3.10 \ + --hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \ + --hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3 + # via trio +outcome==1.3.0.post0 \ + --hash=sha256:9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8 \ + --hash=sha256:e771c5ce06d1415e356078d3bdd68523f284b4ce5419828922b6871e65eda82b + # via trio +pycparser==2.22 \ + --hash=sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6 \ + --hash=sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc + # via cffi +pysocks==1.7.1 \ + --hash=sha256:08e69f092cc6dbe92a0fdd16eeb9b9ffbc13cadfe5ca4c7bd92ffb078b293299 \ + --hash=sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5 \ + --hash=sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0 + # via urllib3 +selenium==4.27.1 \ + --hash=sha256:5296c425a75ff1b44d0d5199042b36a6d1ef76c04fb775b97b40be739a9caae2 \ + --hash=sha256:b89b1f62b5cfe8025868556fe82360d6b649d464f75d2655cb966c8f8447ea18 + # via -r requirements.in +sniffio==1.3.1 \ + --hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 \ + --hash=sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc + # via trio +sortedcontainers==2.4.0 \ + --hash=sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88 \ + --hash=sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0 + # via trio +trio==0.27.0 \ + --hash=sha256:1dcc95ab1726b2da054afea8fd761af74bad79bd52381b84eae408e983c76831 \ + --hash=sha256:68eabbcf8f457d925df62da780eff15ff5dc68fd6b367e2dde59f7aaf2a0b884 + # via + # selenium + # trio-websocket +trio-websocket==0.11.1 \ + --hash=sha256:18c11793647703c158b1f6e62de638acada927344d534e3c7628eedcb746839f \ + --hash=sha256:520d046b0d030cf970b8b2b2e00c4c2245b3807853ecd44214acd33d74581638 + # via selenium +typing-extensions==4.12.2 \ + --hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \ + --hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8 + # via selenium +urllib3[socks]==2.2.3 \ + --hash=sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac \ + --hash=sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9 + # via selenium +websocket-client==1.8.0 \ + --hash=sha256:17b44cc997f5c498e809b22cdf2d9c7a9e71c02c8cc2b6c56e7c2d1239bfa526 \ + --hash=sha256:3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da + # via selenium +wsproto==1.2.0 \ + --hash=sha256:ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065 \ + --hash=sha256:b9acddd652b585d75b20477888c56642fdade28bdfd3579aa24a4d2c037dd736 + # via trio-websocket diff --git a/scalatests/com/google/testing/web/BUILD.bazel b/scalatests/com/google/testing/web/BUILD.bazel index 3f92a2b6..a7b7c5c0 100644 --- a/scalatests/com/google/testing/web/BUILD.bazel +++ b/scalatests/com/google/testing/web/BUILD.bazel @@ -29,7 +29,7 @@ scala_web_test_suite( ], deps = [ "//java/com/google/testing/web", - "@junit_junit", - "@org_seleniumhq_selenium_selenium_api", + "@maven//:junit_junit", + "@maven//:org_seleniumhq_selenium_selenium_api", ], ) diff --git a/testing/web/BUILD.bazel b/testing/web/BUILD.bazel index 8d530256..6c563197 100644 --- a/testing/web/BUILD.bazel +++ b/testing/web/BUILD.bazel @@ -26,7 +26,9 @@ py_library( exclude = ["*_test.py"], ), visibility = ["//visibility:public"], - deps = ["@org_seleniumhq_py"], + deps = [ + "@rules_webtesting_py_deps//selenium", + ], ) py_web_test_suite( diff --git a/web/BUILD.bazel b/web/BUILD.bazel index 609aa004..6b5e9ae1 100644 --- a/web/BUILD.bazel +++ b/web/BUILD.bazel @@ -38,53 +38,18 @@ bzl_library( ], ) -bzl_library( - name = "go_repositories", - srcs = ["go_repositories.bzl"], - deps = [ - ":repositories", - # should depend on @bazel_gazelle//:deps.bzl - ], -) - bzl_library( name = "java", srcs = ["java.bzl"], deps = ["//web/internal:wrap_web_test_suite"], ) -bzl_library( - name = "java_repositories", - srcs = ["java_repositories.bzl"], - deps = [ - ":repositories", - # should depend on "@bazel_tools//tools/build_defs/repo:lib", - ], -) - bzl_library( name = "py", srcs = ["py.bzl"], deps = ["//web/internal:wrap_web_test_suite"], ) -bzl_library( - name = "py_repositories", - srcs = ["py_repositories.bzl"], - deps = [ - ":repositories", - # should depend on "@bazel_tools//tools/build_defs/repo:lib", - ], -) - -bzl_library( - name = "repositories", - srcs = ["repositories.bzl"], - deps = [ - # should depend on "@bazel_tools//tools/build_defs/repo:lib", - ], -) - bzl_library( name = "scala", srcs = ["scala.bzl"], diff --git a/web/extension.bzl b/web/extension.bzl new file mode 100644 index 00000000..81260555 --- /dev/null +++ b/web/extension.bzl @@ -0,0 +1,84 @@ +# Copyright 2024 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Module extension for introducing browsers dependencies.""" + +load("//web/versioned:browsers-0.3.1.bzl", browser_repositories_0_3_1 = "browser_repositories") +load("//web/versioned:browsers-0.3.2.bzl", browser_repositories_0_3_2 = "browser_repositories") +load("//web/versioned:browsers-0.3.3.bzl", browser_repositories_0_3_3 = "browser_repositories") +load("//web/versioned:browsers-0.3.4.bzl", browser_repositories_0_3_4 = "browser_repositories") + +browser_versions = { + "0.3.1": browser_repositories_0_3_1, + "0.3.2": browser_repositories_0_3_2, + "0.3.3": browser_repositories_0_3_3, + "0.3.4": browser_repositories_0_3_4, +} + +def parse_version(version): + if not version: + return [0, 0, 0] + return [int(s) for s in version.split(".")] + +def _browser_repositories_extension(ctx): + version = None + + # Get the override version from the root module if specified. + root_module = ctx.modules[0] + if len(root_module.tags.override_version) > 1: + fail("Only one override_version tag is allowed in the root module.") + override_version = root_module.tags.override_version[0].version if root_module.tags.override_version else None + + if override_version: + version = override_version + else: + # Go through modules in the dependency graph and choose the highest version. + for mod in ctx.modules: + for tag in mod.tags.install: + if parse_version(tag.version) > parse_version(version): + version = tag.version + + if not version: + fail("No version of browser_repositories is specified in the dependency graph, supported versions are %s." % ', '.join(browser_versions.keys())) + + browser_repositories = browser_versions.get(version) + if not browser_repositories: + fail("Unsupported version %s of browser_repositories, supported versions are %s." % (version, ', '.join(browser_versions.keys()))) + + browser_repositories() + + # Mark this module extension as reproducible, so it doesn't appear in lockfile. + return ctx.extension_metadata(reproducible = True) + +# The `install` tag can be used by any module to specify the version of browsers version. +# If multiple versions are specified, the highest one is chosen. +install = tag_class( + attrs = { + "version": attr.string(mandatory = True), + }, +) + +# The `override_version` tag can be used by root module to override the version of browsers version. +override_version = tag_class( + attrs = { + "version": attr.string(mandatory = True), + }, +) + +browser_repositories_extension = module_extension( + implementation = _browser_repositories_extension, + tag_classes = { + "install": install, + "override_version": override_version, + } +) diff --git a/web/go_repositories.bzl b/web/go_repositories.bzl deleted file mode 100644 index 81fa6bf1..00000000 --- a/web/go_repositories.bzl +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright 2019 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -"""Defines external repositories needed by rules_webtesting.""" - -load(":repositories.bzl", "should_create_repository") -load("@bazel_gazelle//:deps.bzl", "go_repository") - -def go_repositories(**kwargs): - """Defines external repositories required to use Go webtest and screenshotter APIs. - - This function exists for other Bazel projects to call from their WORKSPACE - file when depending on rules_webtesting using http_archive. This function - makes it easy to import these transitive dependencies into the parent - workspace. This will check to see if a repository has been previously defined - before defining a new repository. - - Alternatively, individual dependencies may be excluded with an - "omit_" + name parameter. This is useful for users who want to be rigorous - about declaring their own direct dependencies, or when another Bazel project - is depended upon (e.g. rules_closure) that defines the same dependencies as - this one (e.g. com_google_guava_guava.) Alternatively, an allowlist model may be - used by calling the individual functions this method references. - - Please note that while these dependencies are defined, they are not actually - downloaded, unless a target is built that depends on them. - - Args: - **kwargs: omit_... parameters used to prevent importing specific - dependencies. - """ - if should_create_repository("com_github_blang_semver", kwargs): - com_github_blang_semver() - if should_create_repository("com_github_tebeka_selenium", kwargs): - com_github_tebeka_selenium() - if kwargs.keys(): - print("The following parameters are unknown: " + str(kwargs.keys())) - -def go_internal_repositories(**kwargs): - """Defines external repositories required to build WebTesting rules release. - - Alternatively, individual dependencies may be excluded with an - "omit_" + name parameter. This is useful for users who want to be rigorous - about declaring their own direct dependencies, or when another Bazel project - is depended upon (e.g. rules_closure) that defines the same dependencies as - this one (e.g. com_google_guava_guava.) Alternatively, an allowlist model may be - used by calling the individual functions this method references. - - Please note that while these dependencies are defined, they are not actually - downloaded, unless a target is built that depends on them. - - Args: - **kwargs: omit_... parameters used to prevent importing specific - dependencies. - """ - if should_create_repository("com_github_gorilla_mux", kwargs): - com_github_gorilla_mux() - if kwargs.keys(): - print("The following parameters are unknown: " + str(kwargs.keys())) - -def com_github_blang_semver(): - go_repository( - name = "com_github_blang_semver", - importpath = "github.com/blang/semver", - sha256 = "dc85076e7c5a7a44e33fc24df320904b95e2fa12c94a3ac758a574dadd54ee53", - strip_prefix = "semver-3.6.1", - urls = [ - "https://github.com/blang/semver/archive/v3.6.1.tar.gz", - ], - ) - -def com_github_gorilla_mux(): - go_repository( - name = "com_github_gorilla_mux", - importpath = "github.com/gorilla/mux", - sha256 = "92adb9aea022f8b35686b75be50ba1206c4457c2f8a0e2a9d10d8721f35b3f11", - strip_prefix = "mux-1.7.3", - urls = [ - "https://github.com/gorilla/mux/archive/v1.7.3.tar.gz", - ], - ) - -def com_github_tebeka_selenium(): - go_repository( - name = "com_github_tebeka_selenium", - importpath = "github.com/tebeka/selenium", - sha256 = "82846f237b742983a293619e712dcf167e3d7998df3239f3443303d9036ad412", - strip_prefix = "selenium-0.9.9", - urls = [ - "https://github.com/tebeka/selenium/archive/v0.9.9.tar.gz", - ], - ) diff --git a/web/internal/platform_archive.bzl b/web/internal/platform_archive.bzl index 99063031..8ffc737d 100644 --- a/web/internal/platform_archive.bzl +++ b/web/internal/platform_archive.bzl @@ -25,7 +25,7 @@ def _platform_archive_impl(ctx): result_zip_name = "_converted_file_%s.zip" % ctx.attr.name ctx.download(urls, download_file_name, sha256) - ctx.execute([ctx.path(Label("@io_bazel_rules_webtesting//web/internal:convert_dmg.sh")), download_file_name, result_zip_name]) + ctx.execute([ctx.path(Label("@rules_webtesting//web/internal:convert_dmg.sh")), download_file_name, result_zip_name]) ctx.extract(result_zip_name) ctx.delete(result_zip_name) @@ -40,7 +40,7 @@ def _platform_archive_impl(ctx): # `BUILD.bazel` file that exposes the archive files, together with the specified # named files using the `platform_metadata` rule. ctx.file("BUILD.bazel", content = """ -load("@io_bazel_rules_webtesting//web:web.bzl", "platform_metadata") +load("@rules_webtesting//web:web.bzl", "platform_metadata") licenses(%s) diff --git a/web/internal/platform_metadata.bzl b/web/internal/platform_metadata.bzl index 7d9d6f04..aa418682 100644 --- a/web/internal/platform_metadata.bzl +++ b/web/internal/platform_metadata.bzl @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -load("@io_bazel_rules_webtesting//web/internal:metadata.bzl", "metadata") -load("@io_bazel_rules_webtesting//web/internal:provider.bzl", "WebTestInfo") +load("//web/internal:metadata.bzl", "metadata") +load("//web/internal:provider.bzl", "WebTestInfo") def _label_to_manifest_path(label): """Converts the specified label to a manifest path""" diff --git a/web/java_repositories.bzl b/web/java_repositories.bzl deleted file mode 100644 index 8fbaa552..00000000 --- a/web/java_repositories.bzl +++ /dev/null @@ -1,259 +0,0 @@ -# Copyright 2019 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -"""Defines external repositories needed by rules_webtesting.""" - -load(":repositories.bzl", "should_create_repository") -load("@bazel_tools//tools/build_defs/repo:java.bzl", "java_import_external") - -def java_repositories(**kwargs): - """Defines external repositories required to use Java webtest and screenshotter APIs. - - This function exists for other Bazel projects to call from their WORKSPACE - file when depending on rules_webtesting using http_archive. This function - makes it easy to import these transitive dependencies into the parent - workspace. This will check to see if a repository has been previously defined - before defining a new repository. - - Alternatively, individual dependencies may be excluded with an - "omit_" + name parameter. This is useful for users who want to be rigorous - about declaring their own direct dependencies, or when another Bazel project - is depended upon (e.g. rules_closure) that defines the same dependencies as - this one (e.g. com_google_guava_guava.) Alternatively, an allowlist model may be - used by calling the individual functions this method references. - - Please note that while these dependencies are defined, they are not actually - downloaded, unless a target is built that depends on them. - - Args: - **kwargs: omit_... parameters used to prevent importing specific - dependencies. - """ - if should_create_repository("com_google_code_findbugs_jsr305", kwargs): - com_google_code_findbugs_jsr305() - if should_create_repository( - "com_google_errorprone_error_prone_annotations", - kwargs, - ): - com_google_errorprone_error_prone_annotations() - if should_create_repository("com_google_guava_guava", kwargs): - com_google_guava_guava() - if should_create_repository("com_squareup_okhttp3_okhttp", kwargs): - com_squareup_okhttp3_okhttp() - if should_create_repository("com_squareup_okio_okio", kwargs): - com_squareup_okio_okio() - if should_create_repository("junit_junit", kwargs): - junit() - if should_create_repository("net_bytebuddy_byte_buddy", kwargs): - net_bytebuddy_byte_buddy() - if should_create_repository("org_apache_commons_commons_exec", kwargs): - org_apache_commons_commons_exec() - if should_create_repository("org_hamcrest_hamcrest_core", kwargs): - org_hamcrest_hamcrest_core() - if should_create_repository("org_jetbrains_kotlin_kotlin_stdlib", kwargs): - org_jetbrains_kotlin_kotlin_stdlib() - if should_create_repository("org_json_json", kwargs): - org_json_json() - if should_create_repository("org_seleniumhq_selenium_selenium_api", kwargs): - org_seleniumhq_selenium_selenium_api() - if should_create_repository("org_seleniumhq_selenium_selenium_remote_driver", kwargs): - org_seleniumhq_selenium_selenium_remote_driver() - if should_create_repository("org_seleniumhq_selenium_selenium_support", kwargs): - org_seleniumhq_selenium_selenium_support() - if kwargs.keys(): - print("The following parameters are unknown: " + str(kwargs.keys())) - -def com_google_code_findbugs_jsr305(): - java_import_external( - name = "com_google_code_findbugs_jsr305", - jar_sha256 = "766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7", - jar_urls = [ - "https://repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar", - ], - licenses = ["notice"], # BSD 3-clause - ) - -def com_google_errorprone_error_prone_annotations(): - java_import_external( - name = "com_google_errorprone_error_prone_annotations", - jar_sha256 = "ec59f1b702d9afc09e8c3929f5c42777dec623a6ea2731ac694332c7d7680f5a", - jar_urls = [ - "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.3.3/error_prone_annotations-2.3.3.jar", - ], - licenses = ["notice"], # Apache 2.0 - ) - -def com_google_guava_guava(): - java_import_external( - name = "com_google_guava_guava", - jar_sha256 = "73e4d6ae5f0e8f9d292a4db83a2479b5468f83d972ac1ff36d6d0b43943b4f91", - jar_urls = [ - "https://repo1.maven.org/maven2/com/google/guava/guava/28.0-jre/guava-28.0-jre.jar", - ], - licenses = ["notice"], # Apache 2.0 - exports = [ - "@com_google_code_findbugs_jsr305", - "@com_google_errorprone_error_prone_annotations", - ], - ) - -def com_squareup_okhttp3_okhttp(): - java_import_external( - name = "com_squareup_okhttp3_okhttp", - jar_sha256 = "20f483a62087faa1dc8240150fa500b0a42c822735a12481ae32c5238d9922cc", - jar_urls = [ - "https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/4.1.0/okhttp-4.1.0.jar", - ], - licenses = ["notice"], # Apache 2.0 - deps = [ - "@com_squareup_okio_okio", - "@com_google_code_findbugs_jsr305", - ], - ) - -def com_squareup_okio_okio(): - java_import_external( - name = "com_squareup_okio_okio", - jar_sha256 = "1c52079b6159b096181a2fad4df7f15423ee6c66266d1dcb0264bf37c58178b0", - jar_urls = [ - "https://repo1.maven.org/maven2/com/squareup/okio/okio/2.3.0/okio-2.3.0.jar", - ], - licenses = ["notice"], # Apache 2.0 - deps = [ - "@com_google_code_findbugs_jsr305", - "@org_jetbrains_kotlin_kotlin_stdlib", - ], - ) - -def junit(): - java_import_external( - name = "junit_junit", - jar_sha256 = "59721f0805e223d84b90677887d9ff567dc534d7c502ca903c0c2b17f05c116a", - jar_urls = [ - "https://repo1.maven.org/maven2/junit/junit/4.12/junit-4.12.jar", - ], - licenses = ["reciprocal"], # Eclipse Public License 1.0 - testonly_ = 1, - deps = ["@org_hamcrest_hamcrest_core"], - ) - -def net_bytebuddy_byte_buddy(): - java_import_external( - name = "net_bytebuddy_byte_buddy", - jar_sha256 = "6b71e4f70c96b67d420f592148aa4fd1966aba458b35d11f491ff13de97dc862", - jar_urls = [ - "https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy/1.9.16/byte-buddy-1.9.16.jar", - ], - licenses = ["notice"], # Apache 2.0 - deps = ["@com_google_code_findbugs_jsr305"], - ) - -def org_apache_commons_commons_exec(): - java_import_external( - name = "org_apache_commons_commons_exec", - jar_sha256 = - "cb49812dc1bfb0ea4f20f398bcae1a88c6406e213e67f7524fb10d4f8ad9347b", - jar_urls = [ - "https://repo1.maven.org/maven2/org/apache/commons/commons-exec/1.3/commons-exec-1.3.jar", - ], - licenses = ["notice"], # Apache License, Version 2.0 - ) - -def org_hamcrest_hamcrest_core(): - java_import_external( - name = "org_hamcrest_hamcrest_core", - jar_sha256 = "e09109e54a289d88506b9bfec987ddd199f4217c9464132668351b9a4f00bee9", - jar_urls = [ - "https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/2.1/hamcrest-core-2.1.jar", - ], - licenses = ["notice"], # New BSD License - testonly_ = 1, - ) - -def org_jetbrains_kotlin_kotlin_stdlib(): - java_import_external( - name = "org_jetbrains_kotlin_kotlin_stdlib", - jar_sha256 = "6ea3d0921b26919b286f05cbdb906266666a36f9a7c096197114f7495708ffbc", - jar_urls = [ - "https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.3.41/kotlin-stdlib-1.3.41.jar", - ], - licenses = ["notice"], # The Apache Software License, Version 2.0 - ) - -def org_json_json(): - java_import_external( - name = "org_json_json", - jar_sha256 = "518080049ba83181914419d11a25d9bc9833a2d729b6a6e7469fa52851356da7", - jar_urls = [ - "https://repo1.maven.org/maven2/org/json/json/20190722/json-20190722.jar", - ], - licenses = ["notice"], # MIT-style license - ) - -def org_seleniumhq_selenium_selenium_api(): - java_import_external( - name = "org_seleniumhq_selenium_selenium_api", - jar_sha256 = "8bfd5a736eccfc08866301ffc9b7f529e55976355c5799bed8392486df64dee5", - jar_urls = [ - "https://repo1.maven.org/maven2/org/seleniumhq/selenium/selenium-api/3.141.59/selenium-api-3.141.59.jar", - ], - licenses = ["notice"], # The Apache Software License, Version 2.0 - testonly_ = 1, - ) - -def org_seleniumhq_selenium_selenium_remote_driver(): - java_import_external( - name = "org_seleniumhq_selenium_selenium_remote_driver", - jar_sha256 = "9829fe57adf36743d785d0c2e7db504ba3ba0a3aacac652b8867cc854d2dfc45", - jar_urls = [ - "https://repo1.maven.org/maven2/org/seleniumhq/selenium/selenium-remote-driver/3.141.59/selenium-remote-driver-3.141.59.jar", - ], - licenses = ["notice"], # The Apache Software License, Version 2.0 - testonly_ = 1, - deps = [ - "@com_google_guava_guava", - "@net_bytebuddy_byte_buddy", - "@com_squareup_okhttp3_okhttp", - "@com_squareup_okio_okio", - "@org_apache_commons_commons_exec", - "@org_seleniumhq_selenium_selenium_api", - ], - ) - -def org_seleniumhq_selenium_selenium_support(): - java_import_external( - name = "org_seleniumhq_selenium_selenium_support", - jar_sha256 = "2c74196d15277ce6003454d72fc3434091dbf3ba65060942719ba551509404d8", - jar_urls = [ - "https://repo1.maven.org/maven2/org/seleniumhq/selenium/selenium-support/3.141.59/selenium-support-3.141.59.jar", - ], - licenses = ["notice"], # The Apache Software License, Version 2.0 - testonly_ = 1, - deps = [ - "@com_google_guava_guava", - "@net_bytebuddy_byte_buddy", - "@com_squareup_okhttp3_okhttp", - "@com_squareup_okio_okio", - "@org_apache_commons_commons_exec", - "@org_seleniumhq_selenium_selenium_api", - "@org_seleniumhq_selenium_selenium_remote_driver", - ], - ) - -# Artifacts for rules_jvm_external. See: -# https://github.com/bazelbuild/rules_jvm_external#exporting-and-consuming-artifacts-from-external-repositories -RULES_WEBTESTING_ARTIFACTS = [ - "org.seleniumhq.selenium:selenium-api:3.141.59", - "org.seleniumhq.selenium:selenium-remote-driver:3.141.59", - "com.google.guava:guava:28.0-jre", -] diff --git a/web/py_repositories.bzl b/web/py_repositories.bzl deleted file mode 100644 index 26c27920..00000000 --- a/web/py_repositories.bzl +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 2019 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -"""Defines external repositories needed by rules_webtesting.""" - -load(":repositories.bzl", "should_create_repository") -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -def py_repositories(**kwargs): - """Defines external repositories required to use Python webtest and screenshotter APIs. - - This function exists for other Bazel projects to call from their WORKSPACE - file when depending on rules_webtesting using http_archive. This function - makes it easy to import these transitive dependencies into the parent - workspace. This will check to see if a repository has been previously defined - before defining a new repository. - - Alternatively, individual dependencies may be excluded with an - "omit_" + name parameter. This is useful for users who want to be rigorous - about declaring their own direct dependencies, or when another Bazel project - is depended upon (e.g. rules_closure) that defines the same dependencies as - this one (e.g. com_google_guava_guava.) Alternatively, an allowlist model may be - used by calling the individual functions this method references. - - Please note that while these dependencies are defined, they are not actually - downloaded, unless a target is built that depends on them. - - Args: - **kwargs: omit_... parameters used to prevent importing specific - dependencies. - """ - if should_create_repository("com_github_urllib3", kwargs): - com_github_urllib3() - if should_create_repository("org_seleniumhq_py", kwargs): - org_seleniumhq_py() - if kwargs.keys(): - print("The following parameters are unknown: " + str(kwargs.keys())) - -def com_github_urllib3(): - http_archive( - name = "com_github_urllib3", - build_file = str(Label("//build_files:com_github_urllib3.BUILD")), - sha256 = "a53063d8b9210a7bdec15e7b272776b9d42b2fd6816401a0d43006ad2f9902db", - strip_prefix = "urllib3-1.25.2", - urls = [ - "https://files.pythonhosted.org/packages/9a/8b/ea6d2beb2da6e331e9857d0a60b79ed4f72dcbc4e2c7f2d2521b0480fda2/urllib3-1.25.2.tar.gz", - ], - ) - -def org_seleniumhq_py(): - http_archive( - name = "org_seleniumhq_py", - build_file = str(Label("//build_files:org_seleniumhq_py.BUILD")), - sha256 = "deaf32b60ad91a4611b98d8002757f29e6f2c2d5fcaf202e1c9ad06d6772300d", - strip_prefix = "selenium-3.141.0", - urls = [ - "https://files.pythonhosted.org/packages/ed/9c/9030520bf6ff0b4c98988448a93c04fcbd5b13cd9520074d8ed53569ccfe/selenium-3.141.0.tar.gz", - ], - ) diff --git a/web/repositories.bzl b/web/repositories.bzl deleted file mode 100644 index f430a773..00000000 --- a/web/repositories.bzl +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright 2016 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -"""Defines external repositories needed by rules_webtesting.""" - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -def web_test_repositories(**kwargs): - """Defines external repositories required by WebTesting Rules. - - This function exists for other Bazel projects to call from their WORKSPACE - file when depending on rules_webtesting using http_archive. This function - makes it easy to import these transitive dependencies into the parent - workspace. This will check to see if a repository has been previously defined - before defining a new repository. - - Alternatively, individual dependencies may be excluded with an - "omit_" + name parameter. This is useful for users who want to be rigorous - about declaring their own direct dependencies, or when another Bazel project - is depended upon (e.g. rules_closure) that defines the same dependencies as - this one (e.g. com_google_guava_guava.) Alternatively, an allowlist model may be - used by calling the individual functions this method references. - - Please note that while these dependencies are defined, they are not actually - downloaded, unless a target is built that depends on them. - - Args: - **kwargs: omit_... parameters used to prevent importing specific - dependencies. - """ - if should_create_repository("bazel_skylib", kwargs): - bazel_skylib() - if kwargs.keys(): - print("The following parameters are unknown: " + str(kwargs.keys())) - -def should_create_repository(name, args): - """Returns whether the name repository should be created. - This allows creation of a repository to be disabled by either an - "omit_" _+ name parameter or by previously defining a rule for the repository. - The args dict will be mutated to remove "omit_" + name. - Args: - name: The name of the repository that should be checked. - args: A dictionary that contains "omit_...": bool pairs. - Returns: - boolean indicating whether the repository should be created. - """ - key = "omit_" + name - if key in args: - val = args.pop(key) - if val: - return False - if native.existing_rule(name): - return False - return True - -def bazel_skylib(): - http_archive( - name = "bazel_skylib", - urls = [ - "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz", - "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz", - ], - sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c", - ) diff --git a/web/versioned/browsers-0.3.1.bzl b/web/versioned/browsers-0.3.1.bzl index 002db02f..a9788491 100644 --- a/web/versioned/browsers-0.3.1.bzl +++ b/web/versioned/browsers-0.3.1.bzl @@ -15,22 +15,13 @@ load("//web:web.bzl", "platform_archive") -def browser_repositories(firefox = False, chromium = False, sauce = False): - """Sets up repositories for browsers defined in //browsers/.... - - Args: - firefox: Configure repositories for //browsers:firefox-native. - chromium: Configure repositories for //browsers:chromium-native. - sauce: Configure repositories for //browser/sauce:chrome-win10-connect. - """ - if chromium: - org_chromium_chromedriver() - org_chromium_chromium() - if firefox: - org_mozilla_firefox() - org_mozilla_geckodriver() - if sauce: - com_saucelabs_sauce_connect() +def browser_repositories(): + """Sets up repositories for browsers defined in //browsers/.... """ + org_chromium_chromedriver() + org_chromium_chromium() + org_mozilla_firefox() + org_mozilla_geckodriver() + com_saucelabs_sauce_connect() def com_saucelabs_sauce_connect(): platform_archive( diff --git a/web/versioned/browsers-0.3.2.bzl b/web/versioned/browsers-0.3.2.bzl index ce8bdfc1..7ce70921 100644 --- a/web/versioned/browsers-0.3.2.bzl +++ b/web/versioned/browsers-0.3.2.bzl @@ -15,22 +15,13 @@ load("//web:web.bzl", "platform_archive") -def browser_repositories(firefox = False, chromium = False, sauce = False): - """Sets up repositories for browsers defined in //browsers/.... - - Args: - firefox: Configure repositories for //browsers:firefox-native. - chromium: Configure repositories for //browsers:chromium-native. - sauce: Configure repositories for //browser/sauce:chrome-win10-connect. - """ - if chromium: - org_chromium_chromedriver() - org_chromium_chromium() - if firefox: - org_mozilla_firefox() - org_mozilla_geckodriver() - if sauce: - com_saucelabs_sauce_connect() +def browser_repositories(): + """Sets up repositories for browsers defined in //browsers/.... """ + org_chromium_chromedriver() + org_chromium_chromium() + org_mozilla_firefox() + org_mozilla_geckodriver() + com_saucelabs_sauce_connect() def com_saucelabs_sauce_connect(): platform_archive( diff --git a/web/versioned/browsers-0.3.3.bzl b/web/versioned/browsers-0.3.3.bzl index e6535067..389e1df8 100644 --- a/web/versioned/browsers-0.3.3.bzl +++ b/web/versioned/browsers-0.3.3.bzl @@ -15,22 +15,13 @@ load("//web:web.bzl", "platform_archive") -def browser_repositories(firefox = False, chromium = False, sauce = False): - """Sets up repositories for browsers defined in //browsers/.... - - Args: - firefox: Configure repositories for //browsers:firefox-native. - chromium: Configure repositories for //browsers:chromium-native. - sauce: Configure repositories for //browser/sauce:chrome-win10-connect. - """ - if chromium: - org_chromium_chromedriver() - org_chromium_chromium() - if firefox: - org_mozilla_firefox() - org_mozilla_geckodriver() - if sauce: - com_saucelabs_sauce_connect() +def browser_repositories(): + """Sets up repositories for browsers defined in //browsers/.... """ + org_chromium_chromedriver() + org_chromium_chromium() + org_mozilla_firefox() + org_mozilla_geckodriver() + com_saucelabs_sauce_connect() def com_saucelabs_sauce_connect(): platform_archive( diff --git a/web/versioned/browsers-0.3.4.bzl b/web/versioned/browsers-0.3.4.bzl index 669879bb..b409ed6b 100644 --- a/web/versioned/browsers-0.3.4.bzl +++ b/web/versioned/browsers-0.3.4.bzl @@ -15,22 +15,13 @@ load("//web:web.bzl", "platform_archive") -def browser_repositories(firefox = False, chromium = False, sauce = False): - """Sets up repositories for browsers defined in //browsers/.... - - Args: - firefox: Configure repositories for //browsers:firefox-native. - chromium: Configure repositories for //browsers:chromium-native. - sauce: Configure repositories for //browser/sauce:chrome-win10-connect. - """ - if chromium: - org_chromium_chromedriver() - org_chromium_chromium() - if firefox: - org_mozilla_firefox() - org_mozilla_geckodriver() - if sauce: - com_saucelabs_sauce_connect() +def browser_repositories(): + """Sets up repositories for browsers defined in //browsers/.... """ + org_chromium_chromedriver() + org_chromium_chromium() + org_mozilla_firefox() + org_mozilla_geckodriver() + com_saucelabs_sauce_connect() def com_saucelabs_sauce_connect(): platform_archive(