Skip to content

Commit

Permalink
deps: upgrade to Go 1.18.5 (scionproto#4248)
Browse files Browse the repository at this point in the history
Also upgrade:
- rules_go to v0.34
- gazelle to v0.26
- quic-go to v0.27.2

Also drop the dependency on the custom gomock bazel library, instead use
the rules_go gomock rule.
  • Loading branch information
lukedirtwalker authored and benthor committed Nov 24, 2022
1 parent a3865ba commit 6931f48
Show file tree
Hide file tree
Showing 81 changed files with 1,535 additions and 551 deletions.
28 changes: 12 additions & 16 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,32 @@ lint_setup({
# Bazel rules for Golang
http_archive(
name = "io_bazel_rules_go",
sha256 = "f2dcd210c7095febe54b804bb1cd3a58fe8435a909db2ec04e31542631cf715c",
sha256 = "16e9fca53ed6bd4ff4ad76facc9b7b651a89db1689a2877d6fd7b82aa824e366",
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",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.34.0/rules_go-v0.34.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.34.0/rules_go-v0.34.0.zip",
],
)

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

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

# Gazelle
http_archive(
name = "bazel_gazelle",
sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb",
patch_args = ["-p1"],
patches = [
# PR: https://github.com/bazelbuild/bazel-gazelle/pull/1243
"@//patches/bazel_gazelle:gazelle.patch",
],
sha256 = "501deb3d5695ab658e82f6f6f549ba681ea3ca2a5fb7911154b5aa45596183fa",
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.26.0/bazel-gazelle-v0.26.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.26.0/bazel-gazelle-v0.26.0.tar.gz",
],
)

Expand Down Expand Up @@ -236,15 +241,6 @@ http_archive(
url = "https://github.com/bazelbuild/buildtools/archive/2.2.1.zip",
)

http_archive(
name = "com_github_jmhodges_bazel_gomock",
sha256 = "692421b0c5e04ae4bc0bfff42fb1ce8671fe68daee2b8d8ea94657bb1fcddc0a",
strip_prefix = "bazel_gomock-fde78c91cf1783cc1e33ba278922ba67a6ee2a84",
urls = [
"https://github.com/jmhodges/bazel_gomock/archive/fde78c91cf1783cc1e33ba278922ba67a6ee2a84.tar.gz",
],
)

http_file(
name = "buf_bin",
downloaded_file_path = "buf",
Expand Down
2 changes: 1 addition & 1 deletion control/beacon/mock_beacon/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//tools/lint:go.bzl", "go_library")
load("@com_github_jmhodges_bazel_gomock//:gomock.bzl", "gomock")
load("@io_bazel_rules_go//go:def.bzl", "gomock")

gomock(
name = "go_default_mock",
Expand Down
2 changes: 1 addition & 1 deletion control/beaconing/mock_beaconing/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//tools/lint:go.bzl", "go_library")
load("@com_github_jmhodges_bazel_gomock//:gomock.bzl", "gomock")
load("@io_bazel_rules_go//go:def.bzl", "gomock")

gomock(
name = "go_default_mock",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//tools/lint:go.bzl", "go_library")
load("@com_github_jmhodges_bazel_gomock//:gomock.bzl", "gomock")
load("@io_bazel_rules_go//go:def.bzl", "gomock")

gomock(
name = "go_default_mock",
Expand Down
2 changes: 1 addition & 1 deletion control/drkey/grpc/mock_grpc/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//tools/lint:go.bzl", "go_library")
load("@com_github_jmhodges_bazel_gomock//:gomock.bzl", "gomock")
load("@io_bazel_rules_go//go:def.bzl", "gomock")

gomock(
name = "go_default_mock",
Expand Down
2 changes: 1 addition & 1 deletion control/drkey/mock_drkey/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//tools/lint:go.bzl", "go_library")
load("@com_github_jmhodges_bazel_gomock//:gomock.bzl", "gomock")
load("@io_bazel_rules_go//go:def.bzl", "gomock")

gomock(
name = "go_default_mock",
Expand Down
2 changes: 1 addition & 1 deletion control/mgmtapi/mock_mgmtapi/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//tools/lint:go.bzl", "go_library")
load("@com_github_jmhodges_bazel_gomock//:gomock.bzl", "gomock")
load("@io_bazel_rules_go//go:def.bzl", "gomock")

gomock(
name = "go_default_mock",
Expand Down
2 changes: 1 addition & 1 deletion control/trust/mock_trust/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//tools/lint:go.bzl", "go_library")
load("@com_github_jmhodges_bazel_gomock//:gomock.bzl", "gomock")
load("@io_bazel_rules_go//go:def.bzl", "gomock")

gomock(
name = "go_default_mock",
Expand Down
2 changes: 1 addition & 1 deletion daemon/fetcher/mock_fetcher/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//tools/lint:go.bzl", "go_library")
load("@com_github_jmhodges_bazel_gomock//:gomock.bzl", "gomock")
load("@io_bazel_rules_go//go:def.bzl", "gomock")

gomock(
name = "go_default_mock",
Expand Down
2 changes: 1 addition & 1 deletion doc/testing/mocks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ directory ``go/lib/foo``. First, you need to create the subdirectory
``BUILD.bazel``. We need to add a ``gomock`` target in this ``BUILD.bazel`` file for our
interfaces. This would look like the following::

load("@com_github_jmhodges_bazel_gomock//:gomock.bzl", "gomock")
load("@io_bazel_rules_go//go:def.bzl", "gomock")
gomock(
name = "go_default_mock",
out = "mock.go",
Expand Down
2 changes: 1 addition & 1 deletion gateway/control/grpc/mock_grpc/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//tools/lint:go.bzl", "go_library")
load("@com_github_jmhodges_bazel_gomock//:gomock.bzl", "gomock")
load("@io_bazel_rules_go//go:def.bzl", "gomock")

gomock(
name = "go_default_mock",
Expand Down
2 changes: 1 addition & 1 deletion gateway/control/mock_control/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//tools/lint:go.bzl", "go_library")
load("@com_github_jmhodges_bazel_gomock//:gomock.bzl", "gomock")
load("@io_bazel_rules_go//go:def.bzl", "gomock")

gomock(
name = "go_default_mock",
Expand Down
2 changes: 1 addition & 1 deletion gateway/mock_gateway/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//tools/lint:go.bzl", "go_library")
load("@com_github_jmhodges_bazel_gomock//:gomock.bzl", "gomock")
load("@io_bazel_rules_go//go:def.bzl", "gomock")

gomock(
name = "go_default_mock",
Expand Down
2 changes: 1 addition & 1 deletion gateway/pktcls/mock_pktcls/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//tools/lint:go.bzl", "go_library")
load("@com_github_jmhodges_bazel_gomock//:gomock.bzl", "gomock")
load("@io_bazel_rules_go//go:def.bzl", "gomock")

gomock(
name = "go_default_mock",
Expand Down
2 changes: 1 addition & 1 deletion gateway/routing/mock_routing/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//tools/lint:go.bzl", "go_library")
load("@com_github_jmhodges_bazel_gomock//:gomock.bzl", "gomock")
load("@io_bazel_rules_go//go:def.bzl", "gomock")

gomock(
name = "go_default_mock",
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/hashicorp/golang-lru v0.5.4
github.com/iancoleman/strcase v0.2.0
github.com/lestrrat-go/jwx v1.2.7
github.com/lucas-clemente/quic-go v0.27.1
github.com/lucas-clemente/quic-go v0.27.2
github.com/mattn/go-isatty v0.0.14
github.com/mattn/go-sqlite3 v1.14.4
github.com/olekukonko/tablewriter v0.0.5
Expand Down Expand Up @@ -82,8 +82,8 @@ require (
github.com/magiconair/properties v1.8.5 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/marten-seemann/qtls-go1-16 v0.1.5 // indirect
github.com/marten-seemann/qtls-go1-17 v0.1.1 // indirect
github.com/marten-seemann/qtls-go1-18 v0.1.1 // indirect
github.com/marten-seemann/qtls-go1-17 v0.1.2 // indirect
github.com/marten-seemann/qtls-go1-18 v0.1.2 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
Expand Down Expand Up @@ -118,4 +118,4 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

go 1.17
go 1.18
Loading

0 comments on commit 6931f48

Please sign in to comment.