Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
Upgrade Bazel Go toolchaing to 1.19.9
Browse files Browse the repository at this point in the history
This required upgrading:
 * bazel-gazelle to v0.29.0 (see bazel-contrib/rules_go#3199)
 * io_bazel_rules_go to v0.37.0 (see compatibility table w/ bazel-gazelle here https://github.com/bazelbuild/bazel-gazelle/#compatibility-with-rules_go); this was preferred over more recent versions because since 0.38 this requires
org_golang_x_tools v0.5.0 [1], while Tink imports v0.1.12. io_bazel_rules_go
v0.37.0 is compatible with v0.1.12 [2].

[1] https://github.com/bazelbuild/rules_go/blob/cf78385a58e278b542511d246bb1cef287d528e9/go/private/repositories.bzl#L73
[2] https://github.com/bazelbuild/rules_go/blob/2a0f48241cf5a4838b9ccfde228863d75d6c646e/go/private/repositories.bzl#L73

PiperOrigin-RevId: 533540295
  • Loading branch information
morambro authored and copybara-github committed May 19, 2023
1 parent bae5f85 commit 5c6a541
Showing 1 changed file with 44 additions and 18 deletions.
62 changes: 44 additions & 18 deletions go/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,25 @@ http_file(
urls = ["https://pki.goog/roots.pem"],
)

# -------------------------------------------------------------------------
# Bazel Skylib.
# -------------------------------------------------------------------------
# Release from 2023-02-09
# Protobuf vX.21.9 imports a version of bazel-skylib [1] that is incompatible
# with the one required by bazel-gazelle, so we make sure we have a newer
# version [2].
#
# [1] https://github.com/protocolbuffers/protobuf/blob/90b73ac3f0b10320315c2ca0d03a5a9b095d2f66/protobuf_deps.bzl#L28
# [2] https://github.com/bazelbuild/bazel-gazelle/issues/1290#issuecomment-1312809060
http_archive(
name = "bazel_skylib",
sha256 = "b8a1527901774180afc798aeb28c4634bdccf19c4d98e7bdd1ce79d1fe9aaad7",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz",
],
)

# -------------------------------------------------------------------------
# Wycheproof.
# -------------------------------------------------------------------------
Expand Down Expand Up @@ -41,16 +60,36 @@ load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")

protobuf_deps()

# -------------------------------------------------------------------------
# Bazel rules for Go.
# -------------------------------------------------------------------------
# Release from 2022-12-06
#
# NOTE: This version was chosen because since 0.38 this requires
# org_golang_x_tools v0.5.0 [1], while Tink imports v0.1.12. io_bazel_rules_go
# v0.37.0 is compatible with v0.1.12 [2].
#
# [1] https://github.com/bazelbuild/rules_go/blob/cf78385a58e278b542511d246bb1cef287d528e9/go/private/repositories.bzl#L73
# [2] https://github.com/bazelbuild/rules_go/blob/2a0f48241cf5a4838b9ccfde228863d75d6c646e/go/private/repositories.bzl#L73
http_archive(
name = "io_bazel_rules_go",
sha256 = "56d8c5a5c91e1af73eca71a6fab2ced959b67c86d12ba37feedb0a2dfea441a6",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.37.0/rules_go-v0.37.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.37.0/rules_go-v0.37.0.zip",
],
)

# -------------------------------------------------------------------------
# Bazel Gazelle.
# -------------------------------------------------------------------------
# Release from 2021-10-11.
# Release from 2023-01-14
http_archive(
name = "bazel_gazelle",
sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb",
sha256 = "ecba0f04f96b4960a5b250c8e8eeec42281035970aa8852dda73098274d14a1d",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz",
],
)

Expand All @@ -64,19 +103,6 @@ load("//:deps.bzl", "go_dependencies")
# gazelle:repository_macro deps.bzl%go_dependencies
go_dependencies()

# -------------------------------------------------------------------------
# Bazel rules for Go.
# -------------------------------------------------------------------------
# Release from 2022-03-21
http_archive(
name = "io_bazel_rules_go",
sha256 = "f2dcd210c7095febe54b804bb1cd3a58fe8435a909db2ec04e31542631cf715c",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.31.0/rules_go-v0.31.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.31.0/rules_go-v0.31.0.zip",
],
)

load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")

# TODO(b/213404399): Remove after Gazelle issue is fixed.
Expand All @@ -91,7 +117,7 @@ go_rules_dependencies()

go_register_toolchains(
nogo = "@//:tink_nogo",
version = "1.17.6",
version = "1.19.9",
)

gazelle_dependencies()

0 comments on commit 5c6a541

Please sign in to comment.