Update Prysm to Go 1.18 (#10576)

* update go

* Update rules_go patch

* Update gazelle

* begin building

* qtls

* gaz

Co-authored-by: prestonvanloon <preston@prysmaticlabs.com>
This commit is contained in:
Raul Jordan 2022-04-28 17:07:29 +00:00 committed by GitHub
parent 231208c977
commit 7a3df7642b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 16 deletions

View File

@ -60,10 +60,10 @@ bazel_skylib_workspace()
http_archive(
name = "bazel_gazelle",
sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb",
sha256 = "5982e5463f171da99e3bdaeff8c0f48283a7a5f396ec5282910b9e8a49c0dd7e",
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.25.0/bazel-gazelle-v0.25.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.25.0/bazel-gazelle-v0.25.0.tar.gz",
],
)
@ -88,10 +88,10 @@ http_archive(
# Expose internals of go_test for custom build transitions.
"//third_party:io_bazel_rules_go_test.patch",
],
sha256 = "2b1641428dff9018f9e85c0384f03ec6c10660d935b750e3fa1492a281a53b0f",
sha256 = "f2dcd210c7095febe54b804bb1cd3a58fe8435a909db2ec04e31542631cf715c",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.29.0/rules_go-v0.29.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.29.0/rules_go-v0.29.0.zip",
"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",
],
)
@ -176,7 +176,7 @@ load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_depe
go_rules_dependencies()
go_register_toolchains(
go_version = "1.17.9",
go_version = "1.18.1",
nogo = "@//:nogo",
)

View File

@ -1244,6 +1244,13 @@ def prysm_deps():
version = "v1.1.0",
)
go_repository(
name = "com_github_gogo_protobuf",
importpath = "github.com/gogo/protobuf",
commit = "b03c65ea87cdc3521ede29f62fe3ce239267c1bc",
version = "v1.3.2",
)
go_repository(
name = "com_github_golang_freetype",
importpath = "github.com/golang/freetype",
@ -2462,7 +2469,6 @@ def prysm_deps():
)
go_repository(
name = "com_github_lucas_clemente_quic_go",
build_directives = ["gazelle:exclude internal/qtls/go118.go"], # Remove this after go1.18 or later is supported in WORKSPACE.
importpath = "github.com/lucas-clemente/quic-go",
sum = "h1:ALBQXr9UJ8A1LyzvceX4jd9QFsHvlI0RR6BkV16o00A=",
version = "v0.26.0",

2
go.mod
View File

@ -1,6 +1,6 @@
module github.com/prysmaticlabs/prysm
go 1.17
go 1.18
require (
contrib.go.opencensus.io/exporter/jaeger v0.2.1

View File

@ -41,7 +41,9 @@
},
"composites": {
"exclude_files": {
"external/.*": "Third party code"
"external/.*": "Third party code",
"validator/accounts/.*": "Fuzz",
"validator/accounts/wallet_recover_fuzz_test.go": "Fuzz code"
}
},
"cgocall": {
@ -75,6 +77,7 @@
"shared/mock/.*\\.go": "Mocks are OK",
".*/.*mock\\.go": "Mocks are OK",
".*/testmain\\.go": "Test runner generated code",
"validator/accounts/wallet_recover_fuzz_test.go": "Fuzz code",
"proto/.*": "Generated protobuf related code",
"tools/analyzers/properpermissions/testdata/.*": "Analyzer breaks rules"
}
@ -100,6 +103,7 @@
},
"exclude_files": {
".*/.*_test\\.go": "Tests are OK to use weak crypto",
"external/.*": "Third party code",
"crypto/rand/rand\\.go": "Abstracts CSPRNGs for common use",
"shared/aggregation/testing/bitlistutils.go": "Test-only package"
}

View File

@ -1,18 +1,18 @@
diff --git a/go/private/rules/test.bzl b/go/private/rules/test.bzl
index a7936ca9..cbfc996a 100644
index a88ebcc9..f23b0dfb 100644
--- a/go/private/rules/test.bzl
+++ b/go/private/rules/test.bzl
@@ -176,7 +176,7 @@ def _go_test_impl(ctx):
),
@@ -185,7 +185,7 @@ def _go_test_impl(ctx):
testing.TestEnvironment(env),
]
-_go_test_kwargs = {
+go_test_kwargs = {
"implementation": _go_test_impl,
"attrs": {
"data": attr.label_list(allow_files = True),
@@ -213,8 +213,8 @@ _go_test_kwargs = {
"toolchains": ["@io_bazel_rules_go//go:toolchain"],
"data": attr.label_list(
@@ -439,8 +439,8 @@ _go_test_kwargs = {
""",
}
-go_test = rule(**_go_test_kwargs)