Open zellyn opened 4 years ago
For reference, setting branch = "master"
on the git_repository
rule gives the same error.
The published archive includes precompiled versions of two go binaries (Web Test Launcher and WebDriver Server Lite) and removes the source code for those binaries. If using rules_webtesting directly from Git, you need to add a repository rule for rules_go and some go libraries used by the Go code. Adding the following to your WORKSPACE should do the trick:
load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
http_archive(
name = "bazel_gazelle",
sha256 = "be9296bfd64882e3c08e3283c58fcb461fa6dd3c171764fcc4cf322f60615a9b",
urls = [
"https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/bazel-gazelle/releases/download/0.18.1/bazel-gazelle-0.18.1.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/0.18.1/bazel-gazelle-0.18.1.tar.gz",
],
)
load("@io_bazel_rules_webtesting//web:go_repositories.bzl", "go_internal_repositories")
go_internal_repositories()
That worked, at least in spirit 😄
What I ended up with was:
http_archive(
name = "io_bazel_rules_go",
sha256 = "313f2c7a23fecc33023563f082f381a32b9b7254f727a7dd2d6380ccc6dfe09b",
urls = [
"https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/0.19.3/rules_go-0.19.3.tar.gz",
"https://github.com/bazelbuild/rules_go/releases/download/0.19.3/rules_go-0.19.3.tar.gz",
],
)
load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
http_archive(
name = "bazel_gazelle",
sha256 = "be9296bfd64882e3c08e3283c58fcb461fa6dd3c171764fcc4cf322f60615a9b",
urls = [
"https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/bazel-gazelle/releases/download/0.18.1/bazel-gazelle-0.18.1.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/0.18.1/bazel-gazelle-0.18.1.tar.gz",
],
)
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
gazelle_dependencies()
git_repository(
name = "io_bazel_rules_webtesting",
# commit = "75694821771b21546cd36c59f4e93304e71f25a0", # Zellyn's commit that allows REMOVE:--foo to remove browser arguments
tag = "0.3.3",
# branch = "master",
#remote = "ssh://git@gitmirror-us-west.sqcorp.co/git/~zellyn/bazel_rules_webtesting.git",
remote = "https://github.com/bazelbuild/rules_webtesting.git",
)
http_archive(
name = "rules_jvm_external",
sha256 = "e5b97a31a3e8feed91636f42e19b11c49487b85e5de2f387c999ea14d77c7f45",
strip_prefix = "rules_jvm_external-2.9",
url = "https://maven.global.square/artifactory/bazel-binaries/bazelbuild/rules_jvm_external/archive/2.9.zip",
)
load("@io_bazel_rules_webtesting//web:java_repositories.bzl", "java_repositories", "RULES_WEBTESTING_ARTIFACTS")
java_repositories()
load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.2.bzl", "browser_repositories")
browser_repositories(chromium=True, firefox=True)
load("@io_bazel_rules_webtesting//web:go_repositories.bzl", "go_internal_repositories")
go_internal_repositories()
Although it's using the updated metadata merger, it's not actually removing flags. I think it may be an ordering problem; investigating.
As a prequel to creating an internal fork of rules_webtesting, I am simply trying to get it to work using a
git_repository
rule rather than anhttp_archive
rule.However, I get this error:
Downloading the tar, and comparing, it appears that the
go
subdirectory is substantially different between the 0.3.3 tag and the 0.3.3 release: