Skip to content

Commit

Permalink
Use newer rules_go
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Jan 15, 2024
1 parent 200fe6d commit 0a52ac3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
8 changes: 8 additions & 0 deletions tests/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ git_override(
remote = "https://github.com/bazelbuild/rules_rust.git",
)

# Temporary override until newer version is released to the central registry.
# https://github.com/bazelbuild/rules_go/commit/31549c1f0fbe850aee3d2b7dd7a1303952f7cd75
git_override(
module_name = "rules_go",
commit = "31549c1f0fbe850aee3d2b7dd7a1303952f7cd75",
remote = "https://github.com/bazelbuild/rules_go.git",
)

go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(
name = "go_sdk",
Expand Down
10 changes: 5 additions & 5 deletions tests/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,13 @@ http_archive(

# For testing rules_go.

# Temporary override until newer version is released to the central registry.
# https://github.com/bazelbuild/rules_go/commit/31549c1f0fbe850aee3d2b7dd7a1303952f7cd75
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",
],
integrity = "sha256-8cixNZS5cm7qapSierAHoRQh8fA9dKMyFD5PBRvFgOY=",
strip_prefix = "rules_go-31549c1f0fbe850aee3d2b7dd7a1303952f7cd75",
urls = ["https://github.com/bazelbuild/rules_go/archive/31549c1f0fbe850aee3d2b7dd7a1303952f7cd75.tar.gz"],
)

load("@io_bazel_rules_go//go:deps.bzl", "go_download_sdk", "go_rules_dependencies")
Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/run_external_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cd "${scripts_dir}"
# Generate some files needed for the tests.
"${bazel}" query "${common_args[@]}" @io_bazel_rules_go//tests/core/cgo:dylib_test >/dev/null
if [[ ${USE_BZLMOD} == "true" ]]; then
"$("${bazel}" info output_base)/external/rules_go~0.41.0/tests/core/cgo/generate_imported_dylib.sh"
"$("${bazel}" info output_base)/external/rules_go~override/tests/core/cgo/generate_imported_dylib.sh"
else
"$("${bazel}" info output_base)/external/io_bazel_rules_go/tests/core/cgo/generate_imported_dylib.sh"
fi
Expand Down

0 comments on commit 0a52ac3

Please sign in to comment.