diff --git a/WORKSPACE b/WORKSPACE index bec448273..69c396491 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -60,10 +60,10 @@ bazel_skylib_workspace() http_archive( name = "bazel_gazelle", - sha256 = "1f4fc1d91826ec436ae04833430626f4cc02c20bb0a813c0c2f3c4c421307b1d", - strip_prefix = "bazel-gazelle-e368a11b76e92932122d824970dc0ce5feb9c349", + sha256 = "222e49f034ca7a1d1231422cdb67066b885819885c356673cb1f72f748a3c9d4", urls = [ - "https://github.com/bazelbuild/bazel-gazelle/archive/e368a11b76e92932122d824970dc0ce5feb9c349.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.3/bazel-gazelle-v0.22.3.tar.gz", + "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.3/bazel-gazelle-v0.22.3.tar.gz", ], ) @@ -156,7 +156,7 @@ load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_depe go_rules_dependencies() go_register_toolchains( - go_version = "1.15.7", + go_version = "1.16", nogo = "@//:nogo", ) diff --git a/beacon-chain/core/state/stateutils/BUILD.bazel b/beacon-chain/core/state/stateutils/BUILD.bazel index 4beb3e02b..2b2a61b4f 100644 --- a/beacon-chain/core/state/stateutils/BUILD.bazel +++ b/beacon-chain/core/state/stateutils/BUILD.bazel @@ -20,8 +20,8 @@ go_test( name = "go_default_test", size = "small", srcs = ["validator_index_map_test.go"], + embed = [":go_default_library"], deps = [ - ":go_default_library", "//beacon-chain/state:go_default_library", "//proto/beacon/p2p/v1:go_default_library", "//shared/bytesutil:go_default_library", diff --git a/beacon-chain/p2p/peers/peerdata/BUILD.bazel b/beacon-chain/p2p/peers/peerdata/BUILD.bazel index d1ec2859c..8629dd6b9 100644 --- a/beacon-chain/p2p/peers/peerdata/BUILD.bazel +++ b/beacon-chain/p2p/peers/peerdata/BUILD.bazel @@ -20,8 +20,8 @@ go_library( go_test( name = "go_default_test", srcs = ["store_test.go"], + embed = [":go_default_library"], deps = [ - ":go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", "@com_github_libp2p_go_libp2p_core//peer:go_default_library", diff --git a/beacon-chain/p2p/peers/scorers/BUILD.bazel b/beacon-chain/p2p/peers/scorers/BUILD.bazel index 267ef4d0c..a8bdec2d7 100644 --- a/beacon-chain/p2p/peers/scorers/BUILD.bazel +++ b/beacon-chain/p2p/peers/scorers/BUILD.bazel @@ -36,8 +36,8 @@ go_test( "scorers_test.go", "service_test.go", ], + embed = [":go_default_library"], deps = [ - ":go_default_library", "//beacon-chain/flags:go_default_library", "//beacon-chain/p2p/peers:go_default_library", "//beacon-chain/p2p/peers/peerdata:go_default_library", diff --git a/contracts/deposit-contract/BUILD.bazel b/contracts/deposit-contract/BUILD.bazel index 95857bc4e..831b3922e 100644 --- a/contracts/deposit-contract/BUILD.bazel +++ b/contracts/deposit-contract/BUILD.bazel @@ -31,8 +31,8 @@ go_test( "depositContract_test.go", "deposit_tree_test.go", ], + embed = [":go_default_library"], deps = [ - ":go_default_library", "//shared/interop:go_default_library", "//shared/params:go_default_library", "//shared/testutil/assert:go_default_library", diff --git a/deps.bzl b/deps.bzl index 3f2e78dbb..4a6da5e58 100644 --- a/deps.bzl +++ b/deps.bzl @@ -168,6 +168,7 @@ def prysm_deps(): sum = "h1:pv34s756C4pEXnjgPfGYgdhg/ZdajGhyOvzx8k+23nw=", version = "v0.0.0-20170710044230-e206f873d14a", ) + go_repository( name = "com_github_aws_aws_lambda_go", importpath = "github.com/aws/aws-lambda-go", @@ -1059,6 +1060,10 @@ def prysm_deps(): importpath = "github.com/googleapis/gnostic", sum = "h1:rVsPeBmXbYv4If/cumu1AzZPwV58q433hvONV1UEZoI=", version = "v0.1.0", + build_naming_convention = "go_default_library", + build_directives = [ + "gazelle:resolve go github.com/googleapis/gnostic/extensions //extensions:go_default_library", + ], ) go_repository( name = "com_github_gophercloud_gophercloud", @@ -2860,6 +2865,7 @@ def prysm_deps(): sum = "h1:njlZPzLwU639dk2kqnCPPv+wNjq7Xb6EfUxe/oX0/NM=", version = "v0.0.0-20180906055917-c99c65617cd3", ) + go_repository( name = "com_github_streadway_amqp", importpath = "github.com/streadway/amqp", @@ -3394,6 +3400,7 @@ def prysm_deps(): importpath = "k8s.io/client-go", sum = "h1:QaJzz92tsN67oorwzmoB0a9r9ZVHuD5ryjbCKP0U22k=", version = "v0.18.3", + build_naming_convention = "go_default_library", ) go_repository( name = "io_k8s_gengo", diff --git a/go.mod b/go.mod index b7363ce7b..99cfd7d1b 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/prysmaticlabs/prysm -go 1.15 +go 1.16 require ( contrib.go.opencensus.io/exporter/jaeger v0.2.1 diff --git a/go.sum b/go.sum index 70c5b2bbd..058a0a9af 100644 --- a/go.sum +++ b/go.sum @@ -1657,7 +1657,6 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/shared/attestationutil/BUILD.bazel b/shared/attestationutil/BUILD.bazel index 8e9893c5d..fad5017c0 100644 --- a/shared/attestationutil/BUILD.bazel +++ b/shared/attestationutil/BUILD.bazel @@ -21,8 +21,8 @@ go_library( go_test( name = "go_default_test", srcs = ["attestation_utils_test.go"], + embed = [":go_default_library"], deps = [ - ":go_default_library", "//shared/params:go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", diff --git a/shared/bytesutil/BUILD.bazel b/shared/bytesutil/BUILD.bazel index c8669bd28..2460c865e 100644 --- a/shared/bytesutil/BUILD.bazel +++ b/shared/bytesutil/BUILD.bazel @@ -16,8 +16,8 @@ go_test( name = "go_default_test", size = "small", srcs = ["bytes_test.go"], + embed = [":go_default_library"], deps = [ - ":go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", "@com_github_ethereum_go_ethereum//common/hexutil:go_default_library", diff --git a/shared/depositutil/BUILD.bazel b/shared/depositutil/BUILD.bazel index 165721bc6..598a0cfe8 100644 --- a/shared/depositutil/BUILD.bazel +++ b/shared/depositutil/BUILD.bazel @@ -22,8 +22,8 @@ go_library( go_test( name = "go_default_test", srcs = ["deposit_test.go"], + embed = [":go_default_library"], deps = [ - ":go_default_library", "//beacon-chain/core/helpers:go_default_library", "//proto/beacon/p2p/v1:go_default_library", "//shared/bls:go_default_library", diff --git a/shared/fileutil/BUILD.bazel b/shared/fileutil/BUILD.bazel index 4ffb85ab0..5016ae848 100644 --- a/shared/fileutil/BUILD.bazel +++ b/shared/fileutil/BUILD.bazel @@ -16,8 +16,8 @@ go_library( go_test( name = "go_default_test", srcs = ["fileutil_test.go"], + embed = [":go_default_library"], deps = [ - ":go_default_library", "//shared/params:go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", diff --git a/shared/hashutil/BUILD.bazel b/shared/hashutil/BUILD.bazel index df625c354..6384ddaa0 100644 --- a/shared/hashutil/BUILD.bazel +++ b/shared/hashutil/BUILD.bazel @@ -26,8 +26,8 @@ go_test( "hash_test.go", "merkleRoot_test.go", ], + embed = [":go_default_library"], deps = [ - ":go_default_library", "//proto/testing:go_default_library", "//shared/bls:go_default_library", "//shared/bytesutil:go_default_library", diff --git a/shared/htrutils/BUILD.bazel b/shared/htrutils/BUILD.bazel index 6769a0bde..3f0745eab 100644 --- a/shared/htrutils/BUILD.bazel +++ b/shared/htrutils/BUILD.bazel @@ -33,8 +33,8 @@ go_test( "htrutils_test.go", "merkleize_test.go", ], + embed = [":go_default_library"], deps = [ - ":go_default_library", "//proto/beacon/p2p/v1:go_default_library", "//shared/hashutil:go_default_library", "//shared/testutil/assert:go_default_library", diff --git a/shared/interop/BUILD.bazel b/shared/interop/BUILD.bazel index 0170e2b63..bca08f4d7 100644 --- a/shared/interop/BUILD.bazel +++ b/shared/interop/BUILD.bazel @@ -33,8 +33,8 @@ go_test( data = [ "keygen_test_vector.yaml", ], + embed = [":go_default_library"], deps = [ - ":go_default_library", "//beacon-chain/core/state:go_default_library", "//shared/params:go_default_library", "//shared/testutil/assert:go_default_library", diff --git a/shared/iputils/BUILD.bazel b/shared/iputils/BUILD.bazel index 25ba8c292..86c284cd5 100644 --- a/shared/iputils/BUILD.bazel +++ b/shared/iputils/BUILD.bazel @@ -12,9 +12,9 @@ go_test( name = "go_default_test", size = "small", srcs = ["external_ip_test.go"], + embed = [":go_default_library"], tags = ["requires-network"], deps = [ - ":go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", ], diff --git a/shared/mathutil/BUILD.bazel b/shared/mathutil/BUILD.bazel index e6961b79d..27d8e05de 100644 --- a/shared/mathutil/BUILD.bazel +++ b/shared/mathutil/BUILD.bazel @@ -12,8 +12,6 @@ go_test( name = "go_default_test", size = "small", srcs = ["math_helper_test.go"], - deps = [ - ":go_default_library", - "//shared/testutil/require:go_default_library", - ], + embed = [":go_default_library"], + deps = ["//shared/testutil/require:go_default_library"], ) diff --git a/shared/messagehandler/BUILD.bazel b/shared/messagehandler/BUILD.bazel index 347ba13bd..cedb79c76 100644 --- a/shared/messagehandler/BUILD.bazel +++ b/shared/messagehandler/BUILD.bazel @@ -17,8 +17,8 @@ go_test( name = "go_default_test", size = "small", srcs = ["messagehandler_test.go"], + embed = [":go_default_library"], deps = [ - ":go_default_library", "//shared/testutil/require:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", diff --git a/shared/pagination/BUILD.bazel b/shared/pagination/BUILD.bazel index 37220098a..094314ad5 100644 --- a/shared/pagination/BUILD.bazel +++ b/shared/pagination/BUILD.bazel @@ -15,8 +15,8 @@ go_library( go_test( name = "go_default_test", srcs = ["pagination_test.go"], + embed = [":go_default_library"], deps = [ - ":go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", ], diff --git a/shared/runutil/BUILD.bazel b/shared/runutil/BUILD.bazel index d09447dbc..738808e59 100644 --- a/shared/runutil/BUILD.bazel +++ b/shared/runutil/BUILD.bazel @@ -12,5 +12,5 @@ go_library( go_test( name = "go_default_test", srcs = ["every_test.go"], - deps = [":go_default_library"], + embed = [":go_default_library"], ) diff --git a/shared/sliceutil/BUILD.bazel b/shared/sliceutil/BUILD.bazel index a4be5b8b0..dcff1101d 100644 --- a/shared/sliceutil/BUILD.bazel +++ b/shared/sliceutil/BUILD.bazel @@ -16,8 +16,6 @@ go_test( name = "go_default_test", size = "small", srcs = ["slice_test.go"], - deps = [ - ":go_default_library", - "@com_github_prysmaticlabs_eth2_types//:go_default_library", - ], + embed = [":go_default_library"], + deps = ["@com_github_prysmaticlabs_eth2_types//:go_default_library"], ) diff --git a/shared/sszutil/BUILD.bazel b/shared/sszutil/BUILD.bazel index b335f0201..e8aba4519 100644 --- a/shared/sszutil/BUILD.bazel +++ b/shared/sszutil/BUILD.bazel @@ -16,8 +16,8 @@ go_test( name = "go_default_test", size = "small", srcs = ["deep_equal_test.go"], + embed = [":go_default_library"], deps = [ - ":go_default_library", "//proto/beacon/p2p/v1:go_default_library", "//shared/testutil/assert:go_default_library", "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", diff --git a/shared/testutil/assertions/BUILD.bazel b/shared/testutil/assertions/BUILD.bazel index a014cd9e7..1c8502516 100644 --- a/shared/testutil/assertions/BUILD.bazel +++ b/shared/testutil/assertions/BUILD.bazel @@ -17,8 +17,8 @@ go_library( go_test( name = "go_default_test", srcs = ["assertions_test.go"], + embed = [":go_default_library"], deps = [ - ":go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", diff --git a/slasher/detection/attestations/types/BUILD.bazel b/slasher/detection/attestations/types/BUILD.bazel index f54667b7f..49925213c 100644 --- a/slasher/detection/attestations/types/BUILD.bazel +++ b/slasher/detection/attestations/types/BUILD.bazel @@ -22,8 +22,8 @@ go_test( "epoch_store_test.go", "types_test.go", ], + embed = [":go_default_library"], deps = [ - ":go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", "//slasher/db/testing:go_default_library", diff --git a/validator/accounts/wallet/BUILD.bazel b/validator/accounts/wallet/BUILD.bazel index c89c85191..ead222acf 100644 --- a/validator/accounts/wallet/BUILD.bazel +++ b/validator/accounts/wallet/BUILD.bazel @@ -28,8 +28,8 @@ go_library( go_test( name = "go_default_test", srcs = ["wallet_test.go"], + embed = [":go_default_library"], deps = [ - ":go_default_library", "//shared/params:go_default_library", "//shared/testutil/require:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", diff --git a/validator/keymanager/BUILD.bazel b/validator/keymanager/BUILD.bazel index fcc846160..f056b809c 100644 --- a/validator/keymanager/BUILD.bazel +++ b/validator/keymanager/BUILD.bazel @@ -20,8 +20,8 @@ go_library( go_test( name = "go_default_test", srcs = ["types_test.go"], + embed = [":go_default_library"], deps = [ - ":go_default_library", "//validator/keymanager/derived:go_default_library", "//validator/keymanager/imported:go_default_library", "//validator/keymanager/remote:go_default_library",