From d6bd6194298cddbff8b2c50702b5bd3f52edd6a5 Mon Sep 17 00:00:00 2001 From: Preston Van Loon Date: Wed, 30 Jun 2021 14:22:09 -0500 Subject: [PATCH] Bazel: minimal test build transitions (#9122) * Add build transitions for minimal config based tests * respect existing gotags * clean up import * Add some commentary * gaz Co-authored-by: terence tsao Co-authored-by: rauljordan --- BUILD.bazel | 1 + WORKSPACE | 2 + beacon-chain/blockchain/BUILD.bazel | 3 +- beacon-chain/cache/BUILD.bazel | 3 +- beacon-chain/cache/depositcache/BUILD.bazel | 3 +- beacon-chain/core/blocks/BUILD.bazel | 3 +- beacon-chain/core/epoch/BUILD.bazel | 3 +- .../core/epoch/precompute/BUILD.bazel | 3 +- beacon-chain/core/helpers/BUILD.bazel | 3 +- beacon-chain/core/state/BUILD.bazel | 3 +- .../core/state/stateutils/BUILD.bazel | 3 +- beacon-chain/core/validators/BUILD.bazel | 3 +- beacon-chain/db/BUILD.bazel | 3 +- beacon-chain/db/filters/BUILD.bazel | 3 +- beacon-chain/db/kv/BUILD.bazel | 3 +- beacon-chain/db/slasherkv/BUILD.bazel | 3 +- .../forkchoice/protoarray/BUILD.bazel | 3 +- beacon-chain/gateway/BUILD.bazel | 3 +- beacon-chain/node/BUILD.bazel | 3 +- beacon-chain/node/registration/BUILD.bazel | 3 +- .../operations/attestations/BUILD.bazel | 3 +- .../operations/attestations/kv/BUILD.bazel | 3 +- beacon-chain/operations/slashings/BUILD.bazel | 3 +- .../operations/voluntaryexits/BUILD.bazel | 3 +- beacon-chain/p2p/BUILD.bazel | 3 +- beacon-chain/p2p/encoder/BUILD.bazel | 3 +- beacon-chain/p2p/peers/BUILD.bazel | 3 +- beacon-chain/p2p/peers/peerdata/BUILD.bazel | 3 +- beacon-chain/p2p/peers/scorers/BUILD.bazel | 3 +- beacon-chain/p2p/types/BUILD.bazel | 3 +- beacon-chain/powchain/BUILD.bazel | 3 +- beacon-chain/powchain/types/BUILD.bazel | 3 +- beacon-chain/rpc/BUILD.bazel | 3 +- beacon-chain/rpc/apimiddleware/BUILD.bazel | 3 +- beacon-chain/rpc/beacon/BUILD.bazel | 3 +- beacon-chain/rpc/beaconv1/BUILD.bazel | 3 +- beacon-chain/rpc/debug/BUILD.bazel | 3 +- beacon-chain/rpc/debugv1/BUILD.bazel | 3 +- beacon-chain/rpc/eventsv1/BUILD.bazel | 3 +- beacon-chain/rpc/node/BUILD.bazel | 3 +- beacon-chain/rpc/nodev1/BUILD.bazel | 3 +- beacon-chain/rpc/statefetcher/BUILD.bazel | 3 +- beacon-chain/rpc/validator/BUILD.bazel | 3 +- beacon-chain/state/genesis/BUILD.bazel | 3 +- beacon-chain/state/stategen/BUILD.bazel | 3 +- beacon-chain/state/stateutil/BUILD.bazel | 3 +- beacon-chain/state/v1/BUILD.bazel | 3 +- beacon-chain/state/v2/BUILD.bazel | 3 +- beacon-chain/sync/BUILD.bazel | 3 +- beacon-chain/sync/initial-sync/BUILD.bazel | 3 +- cmd/beacon-chain/BUILD.bazel | 4 +- cmd/slasher/BUILD.bazel | 4 +- cmd/validator/BUILD.bazel | 4 +- contracts/deposit-contract/BUILD.bazel | 3 +- endtoend/BUILD.bazel | 3 +- fuzz/testing/BUILD.bazel | 3 +- proto/BUILD.bazel | 20 ++++++-- proto/migration/BUILD.bazel | 3 +- shared/BUILD.bazel | 3 +- shared/abool/BUILD.bazel | 3 +- shared/aggregation/BUILD.bazel | 3 +- shared/aggregation/attestations/BUILD.bazel | 3 +- .../aggregation/sync_contribution/BUILD.bazel | 3 +- shared/asyncutil/BUILD.bazel | 3 +- shared/attestationutil/BUILD.bazel | 3 +- shared/benchutil/BUILD.bazel | 3 +- shared/blockutil/BUILD.bazel | 3 +- shared/bls/BUILD.bazel | 3 +- shared/bytesutil/BUILD.bazel | 3 +- shared/clientstats/BUILD.bazel | 3 +- shared/cmd/BUILD.bazel | 3 +- shared/depositutil/BUILD.bazel | 3 +- shared/event/BUILD.bazel | 3 +- shared/featureconfig/BUILD.bazel | 3 +- shared/fileutil/BUILD.bazel | 3 +- shared/gateway/BUILD.bazel | 3 +- shared/grpcutils/BUILD.bazel | 3 +- shared/hashutil/BUILD.bazel | 3 +- shared/htrutils/BUILD.bazel | 3 +- shared/httputils/BUILD.bazel | 3 +- shared/interop/BUILD.bazel | 3 +- shared/iputils/BUILD.bazel | 3 +- shared/keystore/BUILD.bazel | 3 +- shared/logutil/BUILD.bazel | 3 +- shared/mathutil/BUILD.bazel | 3 +- shared/messagehandler/BUILD.bazel | 3 +- shared/mputil/BUILD.bazel | 3 +- shared/pagination/BUILD.bazel | 3 +- shared/params/BUILD.bazel | 3 +- shared/prereq/BUILD.bazel | 3 +- shared/prometheus/BUILD.bazel | 3 +- shared/promptutil/BUILD.bazel | 3 +- shared/rand/BUILD.bazel | 3 +- shared/runutil/BUILD.bazel | 3 +- shared/slashutil/BUILD.bazel | 3 +- shared/sliceutil/BUILD.bazel | 3 +- shared/slotutil/BUILD.bazel | 3 +- shared/slotutil/testing/BUILD.bazel | 3 +- shared/sszutil/BUILD.bazel | 3 +- shared/testutil/BUILD.bazel | 3 +- shared/testutil/assertions/BUILD.bazel | 3 +- shared/tos/BUILD.bazel | 3 +- shared/trieutil/BUILD.bazel | 3 +- slasher/beaconclient/BUILD.bazel | 3 +- slasher/cache/BUILD.bazel | 3 +- slasher/db/BUILD.bazel | 3 +- slasher/db/kv/BUILD.bazel | 3 +- slasher/db/testing/BUILD.bazel | 3 +- slasher/detection/BUILD.bazel | 3 +- slasher/detection/attestations/BUILD.bazel | 3 +- .../detection/attestations/types/BUILD.bazel | 3 +- slasher/detection/proposals/BUILD.bazel | 3 +- slasher/node/BUILD.bazel | 3 +- slasher/rpc/BUILD.bazel | 3 +- spectest/general/phase0/bls/BUILD.bazel | 3 +- .../phase0/epoch_processing/BUILD.bazel | 2 +- spectest/mainnet/phase0/finality/BUILD.bazel | 2 +- .../mainnet/phase0/operations/BUILD.bazel | 2 +- spectest/mainnet/phase0/rewards/BUILD.bazel | 2 +- spectest/mainnet/phase0/sanity/BUILD.bazel | 2 +- .../phase0/shuffling/core/shuffle/BUILD.bazel | 2 +- .../mainnet/phase0/ssz_static/BUILD.bazel | 2 +- .../phase0/epoch_processing/BUILD.bazel | 5 +- spectest/minimal/phase0/finality/BUILD.bazel | 4 +- .../minimal/phase0/operations/BUILD.bazel | 4 +- spectest/minimal/phase0/rewards/BUILD.bazel | 4 +- spectest/minimal/phase0/sanity/BUILD.bazel | 4 +- .../phase0/shuffling/core/shuffle/BUILD.bazel | 4 +- .../minimal/phase0/ssz_static/BUILD.bazel | 4 +- spectest/utils/BUILD.bazel | 3 +- third_party/io_bazel_rules_go_test.patch | 24 ++++++++++ tools/analyzers/errcheck/BUILD.bazel | 4 +- tools/bootnode/BUILD.bazel | 4 +- tools/cluster-pk-manager/server/BUILD.bazel | 4 +- tools/genesis-state-gen/BUILD.bazel | 4 +- tools/go/def.bzl | 47 ++++++++++++++++++- tools/http-request-sink/BUILD.bazel | 4 +- tools/interop/split-keys/BUILD.bazel | 4 +- tools/keystores/BUILD.bazel | 4 +- tools/unencrypted-keys-gen/BUILD.bazel | 4 +- validator/accounts/BUILD.bazel | 3 +- validator/accounts/wallet/BUILD.bazel | 3 +- validator/client/BUILD.bazel | 3 +- validator/db/BUILD.bazel | 3 +- validator/db/kv/BUILD.bazel | 3 +- validator/db/testing/BUILD.bazel | 3 +- validator/graffiti/BUILD.bazel | 3 +- validator/keymanager/BUILD.bazel | 3 +- validator/keymanager/derived/BUILD.bazel | 3 +- validator/keymanager/imported/BUILD.bazel | 3 +- validator/keymanager/remote/BUILD.bazel | 3 +- validator/node/BUILD.bazel | 3 +- validator/rpc/BUILD.bazel | 3 +- validator/slashing-protection/BUILD.bazel | 3 +- .../standard-protection-format/BUILD.bazel | 3 +- 155 files changed, 258 insertions(+), 298 deletions(-) create mode 100644 third_party/io_bazel_rules_go_test.patch diff --git a/BUILD.bazel b/BUILD.bazel index f7c41e7f0..d669eef55 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -14,6 +14,7 @@ exports_files([ # gazelle:prefix github.com/prysmaticlabs/prysm # gazelle:map_kind go_library go_library @prysm//tools/go:def.bzl +# gazelle:map_kind go_test go_test @prysm//tools/go:def.bzl # gazelle:map_kind go_repository go_repository @prysm//tools/go:def.bzl gazelle( name = "gazelle", diff --git a/WORKSPACE b/WORKSPACE index 3653c42d7..5153bfe84 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -88,6 +88,8 @@ http_archive( # Required until https://github.com/bazelbuild/rules_go/pull/2450 merges otherwise nilness # nogo check fails for certain third_party dependencies. "//third_party:io_bazel_rules_go.patch", + # Expose internals of go_test for custom build transitions. + "//third_party:io_bazel_rules_go_test.patch", ], sha256 = "7c10271940c6bce577d51a075ae77728964db285dac0a46614a7934dc34303e6", urls = [ diff --git a/beacon-chain/blockchain/BUILD.bazel b/beacon-chain/blockchain/BUILD.bazel index 27cb97861..6dfcb367b 100644 --- a/beacon-chain/blockchain/BUILD.bazel +++ b/beacon-chain/blockchain/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/cache/BUILD.bazel b/beacon-chain/cache/BUILD.bazel index cbf444568..1b56128c2 100644 --- a/beacon-chain/cache/BUILD.bazel +++ b/beacon-chain/cache/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") # gazelle:exclude committee_disabled.go # gazelle:exclude proposer_indices_disabled.go diff --git a/beacon-chain/cache/depositcache/BUILD.bazel b/beacon-chain/cache/depositcache/BUILD.bazel index ebfa59855..40f94b3fd 100644 --- a/beacon-chain/cache/depositcache/BUILD.bazel +++ b/beacon-chain/cache/depositcache/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/core/blocks/BUILD.bazel b/beacon-chain/core/blocks/BUILD.bazel index b11a0a3ac..35d6f216c 100644 --- a/beacon-chain/core/blocks/BUILD.bazel +++ b/beacon-chain/core/blocks/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/core/epoch/BUILD.bazel b/beacon-chain/core/epoch/BUILD.bazel index 9a8eff735..7da6a79a7 100644 --- a/beacon-chain/core/epoch/BUILD.bazel +++ b/beacon-chain/core/epoch/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/core/epoch/precompute/BUILD.bazel b/beacon-chain/core/epoch/precompute/BUILD.bazel index 97d879e9a..3d63ad2d7 100644 --- a/beacon-chain/core/epoch/precompute/BUILD.bazel +++ b/beacon-chain/core/epoch/precompute/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/core/helpers/BUILD.bazel b/beacon-chain/core/helpers/BUILD.bazel index c16e96743..206a6c360 100644 --- a/beacon-chain/core/helpers/BUILD.bazel +++ b/beacon-chain/core/helpers/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/core/state/BUILD.bazel b/beacon-chain/core/state/BUILD.bazel index 81532f099..aa5b16058 100644 --- a/beacon-chain/core/state/BUILD.bazel +++ b/beacon-chain/core/state/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") # gazelle:exclude testdata diff --git a/beacon-chain/core/state/stateutils/BUILD.bazel b/beacon-chain/core/state/stateutils/BUILD.bazel index b426f57ef..645412572 100644 --- a/beacon-chain/core/state/stateutils/BUILD.bazel +++ b/beacon-chain/core/state/stateutils/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/core/validators/BUILD.bazel b/beacon-chain/core/validators/BUILD.bazel index b7d5cc476..810d23747 100644 --- a/beacon-chain/core/validators/BUILD.bazel +++ b/beacon-chain/core/validators/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/db/BUILD.bazel b/beacon-chain/db/BUILD.bazel index 9c5d4d440..30ff0d9bb 100644 --- a/beacon-chain/db/BUILD.bazel +++ b/beacon-chain/db/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") # Build with --define=kafka_enabled=false to exclude kafka wrapper. config_setting( diff --git a/beacon-chain/db/filters/BUILD.bazel b/beacon-chain/db/filters/BUILD.bazel index 3e60db08e..46c2b6a9b 100644 --- a/beacon-chain/db/filters/BUILD.bazel +++ b/beacon-chain/db/filters/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/db/kv/BUILD.bazel b/beacon-chain/db/kv/BUILD.bazel index fb96ec867..31af90773 100644 --- a/beacon-chain/db/kv/BUILD.bazel +++ b/beacon-chain/db/kv/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/db/slasherkv/BUILD.bazel b/beacon-chain/db/slasherkv/BUILD.bazel index 084493e1f..bfdd5a8c6 100644 --- a/beacon-chain/db/slasherkv/BUILD.bazel +++ b/beacon-chain/db/slasherkv/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/forkchoice/protoarray/BUILD.bazel b/beacon-chain/forkchoice/protoarray/BUILD.bazel index f6b63f6b3..52d31cd33 100644 --- a/beacon-chain/forkchoice/protoarray/BUILD.bazel +++ b/beacon-chain/forkchoice/protoarray/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/gateway/BUILD.bazel b/beacon-chain/gateway/BUILD.bazel index c91b73a9a..ea8e91818 100644 --- a/beacon-chain/gateway/BUILD.bazel +++ b/beacon-chain/gateway/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/node/BUILD.bazel b/beacon-chain/node/BUILD.bazel index 762bca657..0adc246f3 100644 --- a/beacon-chain/node/BUILD.bazel +++ b/beacon-chain/node/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/node/registration/BUILD.bazel b/beacon-chain/node/registration/BUILD.bazel index 7ca6fcf93..249bdc96a 100644 --- a/beacon-chain/node/registration/BUILD.bazel +++ b/beacon-chain/node/registration/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/operations/attestations/BUILD.bazel b/beacon-chain/operations/attestations/BUILD.bazel index ec9c63e17..5b8403f82 100644 --- a/beacon-chain/operations/attestations/BUILD.bazel +++ b/beacon-chain/operations/attestations/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/operations/attestations/kv/BUILD.bazel b/beacon-chain/operations/attestations/kv/BUILD.bazel index 707b74883..44e7a426f 100644 --- a/beacon-chain/operations/attestations/kv/BUILD.bazel +++ b/beacon-chain/operations/attestations/kv/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/operations/slashings/BUILD.bazel b/beacon-chain/operations/slashings/BUILD.bazel index 5f7700dbb..4da424b2c 100644 --- a/beacon-chain/operations/slashings/BUILD.bazel +++ b/beacon-chain/operations/slashings/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/operations/voluntaryexits/BUILD.bazel b/beacon-chain/operations/voluntaryexits/BUILD.bazel index e52a05ff9..7c369f5a4 100644 --- a/beacon-chain/operations/voluntaryexits/BUILD.bazel +++ b/beacon-chain/operations/voluntaryexits/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/p2p/BUILD.bazel b/beacon-chain/p2p/BUILD.bazel index e58d352f7..00165c402 100644 --- a/beacon-chain/p2p/BUILD.bazel +++ b/beacon-chain/p2p/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/p2p/encoder/BUILD.bazel b/beacon-chain/p2p/encoder/BUILD.bazel index f1611790c..736df8b39 100644 --- a/beacon-chain/p2p/encoder/BUILD.bazel +++ b/beacon-chain/p2p/encoder/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/p2p/peers/BUILD.bazel b/beacon-chain/p2p/peers/BUILD.bazel index dfbcf5ae6..3772e5748 100644 --- a/beacon-chain/p2p/peers/BUILD.bazel +++ b/beacon-chain/p2p/peers/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/p2p/peers/peerdata/BUILD.bazel b/beacon-chain/p2p/peers/peerdata/BUILD.bazel index 28af326ed..5fee817e9 100644 --- a/beacon-chain/p2p/peers/peerdata/BUILD.bazel +++ b/beacon-chain/p2p/peers/peerdata/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/p2p/peers/scorers/BUILD.bazel b/beacon-chain/p2p/peers/scorers/BUILD.bazel index a7caf62b5..ef5944965 100644 --- a/beacon-chain/p2p/peers/scorers/BUILD.bazel +++ b/beacon-chain/p2p/peers/scorers/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/p2p/types/BUILD.bazel b/beacon-chain/p2p/types/BUILD.bazel index d209a1509..de17529f8 100644 --- a/beacon-chain/p2p/types/BUILD.bazel +++ b/beacon-chain/p2p/types/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/powchain/BUILD.bazel b/beacon-chain/powchain/BUILD.bazel index f863c66aa..122f5b521 100644 --- a/beacon-chain/powchain/BUILD.bazel +++ b/beacon-chain/powchain/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/powchain/types/BUILD.bazel b/beacon-chain/powchain/types/BUILD.bazel index 915f372c9..db3a88851 100644 --- a/beacon-chain/powchain/types/BUILD.bazel +++ b/beacon-chain/powchain/types/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/rpc/BUILD.bazel b/beacon-chain/rpc/BUILD.bazel index 7a09c747d..2acc8008b 100644 --- a/beacon-chain/rpc/BUILD.bazel +++ b/beacon-chain/rpc/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/rpc/apimiddleware/BUILD.bazel b/beacon-chain/rpc/apimiddleware/BUILD.bazel index 8d1c7104d..66da9c866 100644 --- a/beacon-chain/rpc/apimiddleware/BUILD.bazel +++ b/beacon-chain/rpc/apimiddleware/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/rpc/beacon/BUILD.bazel b/beacon-chain/rpc/beacon/BUILD.bazel index e15365f09..e2f41a498 100644 --- a/beacon-chain/rpc/beacon/BUILD.bazel +++ b/beacon-chain/rpc/beacon/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/rpc/beaconv1/BUILD.bazel b/beacon-chain/rpc/beaconv1/BUILD.bazel index 9cfc06555..b547890d7 100644 --- a/beacon-chain/rpc/beaconv1/BUILD.bazel +++ b/beacon-chain/rpc/beaconv1/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/rpc/debug/BUILD.bazel b/beacon-chain/rpc/debug/BUILD.bazel index 5ec49831d..338dde995 100644 --- a/beacon-chain/rpc/debug/BUILD.bazel +++ b/beacon-chain/rpc/debug/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/rpc/debugv1/BUILD.bazel b/beacon-chain/rpc/debugv1/BUILD.bazel index 52d421395..7e4b1142f 100644 --- a/beacon-chain/rpc/debugv1/BUILD.bazel +++ b/beacon-chain/rpc/debugv1/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/rpc/eventsv1/BUILD.bazel b/beacon-chain/rpc/eventsv1/BUILD.bazel index c221d63bc..fbb3a2cc9 100644 --- a/beacon-chain/rpc/eventsv1/BUILD.bazel +++ b/beacon-chain/rpc/eventsv1/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/rpc/node/BUILD.bazel b/beacon-chain/rpc/node/BUILD.bazel index e4c906535..59eee46bd 100644 --- a/beacon-chain/rpc/node/BUILD.bazel +++ b/beacon-chain/rpc/node/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/rpc/nodev1/BUILD.bazel b/beacon-chain/rpc/nodev1/BUILD.bazel index 99cc5fab9..2bea71aa5 100644 --- a/beacon-chain/rpc/nodev1/BUILD.bazel +++ b/beacon-chain/rpc/nodev1/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/rpc/statefetcher/BUILD.bazel b/beacon-chain/rpc/statefetcher/BUILD.bazel index 6420b0672..c3c76a260 100644 --- a/beacon-chain/rpc/statefetcher/BUILD.bazel +++ b/beacon-chain/rpc/statefetcher/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/rpc/validator/BUILD.bazel b/beacon-chain/rpc/validator/BUILD.bazel index a16ee9572..03f5b42b3 100644 --- a/beacon-chain/rpc/validator/BUILD.bazel +++ b/beacon-chain/rpc/validator/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/state/genesis/BUILD.bazel b/beacon-chain/state/genesis/BUILD.bazel index ac569f6b2..eb77f7986 100644 --- a/beacon-chain/state/genesis/BUILD.bazel +++ b/beacon-chain/state/genesis/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/state/stategen/BUILD.bazel b/beacon-chain/state/stategen/BUILD.bazel index 1a2597378..1e4421327 100644 --- a/beacon-chain/state/stategen/BUILD.bazel +++ b/beacon-chain/state/stategen/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/state/stateutil/BUILD.bazel b/beacon-chain/state/stateutil/BUILD.bazel index 859d4e57e..e7122bfc3 100644 --- a/beacon-chain/state/stateutil/BUILD.bazel +++ b/beacon-chain/state/stateutil/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/state/v1/BUILD.bazel b/beacon-chain/state/v1/BUILD.bazel index 752952f33..9eb7b28c9 100644 --- a/beacon-chain/state/v1/BUILD.bazel +++ b/beacon-chain/state/v1/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/state/v2/BUILD.bazel b/beacon-chain/state/v2/BUILD.bazel index e2a228c5d..a4b5b4f1d 100644 --- a/beacon-chain/state/v2/BUILD.bazel +++ b/beacon-chain/state/v2/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/sync/BUILD.bazel b/beacon-chain/sync/BUILD.bazel index 825734bb5..869f6e81f 100644 --- a/beacon-chain/sync/BUILD.bazel +++ b/beacon-chain/sync/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/beacon-chain/sync/initial-sync/BUILD.bazel b/beacon-chain/sync/initial-sync/BUILD.bazel index b1c3112b5..38d8f3397 100644 --- a/beacon-chain/sync/initial-sync/BUILD.bazel +++ b/beacon-chain/sync/initial-sync/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/cmd/beacon-chain/BUILD.bazel b/cmd/beacon-chain/BUILD.bazel index d4aeef302..cfcfcff20 100644 --- a/cmd/beacon-chain/BUILD.bazel +++ b/cmd/beacon-chain/BUILD.bazel @@ -1,5 +1,5 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") +load("@io_bazel_rules_go//go:def.bzl", "go_binary") load("@io_bazel_rules_docker//go:image.bzl", "go_image") load("@io_bazel_rules_docker//container:container.bzl", "container_bundle", "container_image") load("//tools:go_image.bzl", "go_image_alpine", "go_image_debug") diff --git a/cmd/slasher/BUILD.bazel b/cmd/slasher/BUILD.bazel index 2b69a78bd..36731eb0a 100644 --- a/cmd/slasher/BUILD.bazel +++ b/cmd/slasher/BUILD.bazel @@ -1,5 +1,5 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") +load("@io_bazel_rules_go//go:def.bzl", "go_binary") load("@io_bazel_rules_docker//go:image.bzl", "go_image") load("@io_bazel_rules_docker//container:container.bzl", "container_bundle", "container_image") load("@io_bazel_rules_docker//contrib:push-all.bzl", "docker_push") diff --git a/cmd/validator/BUILD.bazel b/cmd/validator/BUILD.bazel index 36a7af430..54f5be58c 100644 --- a/cmd/validator/BUILD.bazel +++ b/cmd/validator/BUILD.bazel @@ -1,5 +1,5 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") +load("@io_bazel_rules_go//go:def.bzl", "go_binary") load("@io_bazel_rules_docker//go:image.bzl", "go_image") load("@io_bazel_rules_docker//container:container.bzl", "container_bundle", "container_image") load("//tools:go_image.bzl", "go_image_alpine", "go_image_debug") diff --git a/contracts/deposit-contract/BUILD.bazel b/contracts/deposit-contract/BUILD.bazel index 95857bc4e..87effffaf 100644 --- a/contracts/deposit-contract/BUILD.bazel +++ b/contracts/deposit-contract/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/endtoend/BUILD.bazel b/endtoend/BUILD.bazel index 67febd901..f63a4ab94 100644 --- a/endtoend/BUILD.bazel +++ b/endtoend/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_test") # gazelle:exclude geth_deps.go @@ -20,6 +20,7 @@ go_test( "//tools/bootnode", "@com_github_ethereum_go_ethereum//cmd/geth", ], + eth_network = "minimal", shard_count = 2, tags = [ "e2e", diff --git a/fuzz/testing/BUILD.bazel b/fuzz/testing/BUILD.bazel index 5e1888eed..3ee17bee3 100644 --- a/fuzz/testing/BUILD.bazel +++ b/fuzz/testing/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/proto/BUILD.bazel b/proto/BUILD.bazel index 65fe871e4..f24185795 100644 --- a/proto/BUILD.bazel +++ b/proto/BUILD.bazel @@ -1,13 +1,25 @@ +load( + "@bazel_skylib//rules:common_settings.bzl", + "string_flag", +) + +# Example flag: --//proto:network=minimal +string_flag( + name = "network", + build_setting_default = "mainnet", + visibility = ["//visibility:public"], +) + config_setting( name = "ssz_mainnet", - define_values = { - "ssz": "mainnet", + flag_values = { + "@prysm//proto:network": "mainnet", }, ) config_setting( name = "ssz_minimal", - define_values = { - "ssz": "minimal", + flag_values = { + "@prysm//proto:network": "minimal", }, ) diff --git a/proto/migration/BUILD.bazel b/proto/migration/BUILD.bazel index 4bca2b9d8..fc25d088d 100644 --- a/proto/migration/BUILD.bazel +++ b/proto/migration/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/BUILD.bazel b/shared/BUILD.bazel index 9f617a805..786e3babc 100644 --- a/shared/BUILD.bazel +++ b/shared/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/abool/BUILD.bazel b/shared/abool/BUILD.bazel index 9e52b9a6e..e88ab1c75 100644 --- a/shared/abool/BUILD.bazel +++ b/shared/abool/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/aggregation/BUILD.bazel b/shared/aggregation/BUILD.bazel index 9a4ab2e42..adc15a240 100644 --- a/shared/aggregation/BUILD.bazel +++ b/shared/aggregation/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/aggregation/attestations/BUILD.bazel b/shared/aggregation/attestations/BUILD.bazel index 9059b67b1..d96853bf4 100644 --- a/shared/aggregation/attestations/BUILD.bazel +++ b/shared/aggregation/attestations/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/aggregation/sync_contribution/BUILD.bazel b/shared/aggregation/sync_contribution/BUILD.bazel index cb5bf0378..51f03bde6 100644 --- a/shared/aggregation/sync_contribution/BUILD.bazel +++ b/shared/aggregation/sync_contribution/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/asyncutil/BUILD.bazel b/shared/asyncutil/BUILD.bazel index 61d194cd3..9e9c8e4b5 100644 --- a/shared/asyncutil/BUILD.bazel +++ b/shared/asyncutil/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/attestationutil/BUILD.bazel b/shared/attestationutil/BUILD.bazel index fc0bcfdb0..987c35eec 100644 --- a/shared/attestationutil/BUILD.bazel +++ b/shared/attestationutil/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/benchutil/BUILD.bazel b/shared/benchutil/BUILD.bazel index 7fb7ec326..3ab28f88c 100644 --- a/shared/benchutil/BUILD.bazel +++ b/shared/benchutil/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/blockutil/BUILD.bazel b/shared/blockutil/BUILD.bazel index d30a73c03..40a841bee 100644 --- a/shared/blockutil/BUILD.bazel +++ b/shared/blockutil/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/bls/BUILD.bazel b/shared/bls/BUILD.bazel index 349b17363..2e32dedd3 100644 --- a/shared/bls/BUILD.bazel +++ b/shared/bls/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/bytesutil/BUILD.bazel b/shared/bytesutil/BUILD.bazel index f10e42acb..515bf6910 100644 --- a/shared/bytesutil/BUILD.bazel +++ b/shared/bytesutil/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/clientstats/BUILD.bazel b/shared/clientstats/BUILD.bazel index ddaf9df6f..8a6716ee3 100644 --- a/shared/clientstats/BUILD.bazel +++ b/shared/clientstats/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/cmd/BUILD.bazel b/shared/cmd/BUILD.bazel index 3fcd0cfff..6687c153f 100644 --- a/shared/cmd/BUILD.bazel +++ b/shared/cmd/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/depositutil/BUILD.bazel b/shared/depositutil/BUILD.bazel index ee292058f..63132077d 100644 --- a/shared/depositutil/BUILD.bazel +++ b/shared/depositutil/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/event/BUILD.bazel b/shared/event/BUILD.bazel index 56e958c71..2add93e9d 100644 --- a/shared/event/BUILD.bazel +++ b/shared/event/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/featureconfig/BUILD.bazel b/shared/featureconfig/BUILD.bazel index 6d1780c22..7dbfe21f9 100644 --- a/shared/featureconfig/BUILD.bazel +++ b/shared/featureconfig/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/fileutil/BUILD.bazel b/shared/fileutil/BUILD.bazel index 4ffb85ab0..ad07ccd9e 100644 --- a/shared/fileutil/BUILD.bazel +++ b/shared/fileutil/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/gateway/BUILD.bazel b/shared/gateway/BUILD.bazel index 24020dc2b..4cde9249c 100644 --- a/shared/gateway/BUILD.bazel +++ b/shared/gateway/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/grpcutils/BUILD.bazel b/shared/grpcutils/BUILD.bazel index c958ff1c5..21d1f7566 100644 --- a/shared/grpcutils/BUILD.bazel +++ b/shared/grpcutils/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/hashutil/BUILD.bazel b/shared/hashutil/BUILD.bazel index 51c205fe1..7422917b2 100644 --- a/shared/hashutil/BUILD.bazel +++ b/shared/hashutil/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/htrutils/BUILD.bazel b/shared/htrutils/BUILD.bazel index 14d68e4df..cbed68542 100644 --- a/shared/htrutils/BUILD.bazel +++ b/shared/htrutils/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/httputils/BUILD.bazel b/shared/httputils/BUILD.bazel index d87847088..176f8788d 100644 --- a/shared/httputils/BUILD.bazel +++ b/shared/httputils/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/interop/BUILD.bazel b/shared/interop/BUILD.bazel index ef10ab53d..927a1e621 100644 --- a/shared/interop/BUILD.bazel +++ b/shared/interop/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/iputils/BUILD.bazel b/shared/iputils/BUILD.bazel index 25ba8c292..a4c8c788b 100644 --- a/shared/iputils/BUILD.bazel +++ b/shared/iputils/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/keystore/BUILD.bazel b/shared/keystore/BUILD.bazel index 9c481d2cd..e953cb288 100644 --- a/shared/keystore/BUILD.bazel +++ b/shared/keystore/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/logutil/BUILD.bazel b/shared/logutil/BUILD.bazel index 9fff11f19..4665780bc 100644 --- a/shared/logutil/BUILD.bazel +++ b/shared/logutil/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/mathutil/BUILD.bazel b/shared/mathutil/BUILD.bazel index cd4edf7bf..f8889bf8c 100644 --- a/shared/mathutil/BUILD.bazel +++ b/shared/mathutil/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/messagehandler/BUILD.bazel b/shared/messagehandler/BUILD.bazel index 20475396b..64214fc79 100644 --- a/shared/messagehandler/BUILD.bazel +++ b/shared/messagehandler/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/mputil/BUILD.bazel b/shared/mputil/BUILD.bazel index 4f84440de..f5ba42359 100644 --- a/shared/mputil/BUILD.bazel +++ b/shared/mputil/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/pagination/BUILD.bazel b/shared/pagination/BUILD.bazel index 37220098a..3e71df025 100644 --- a/shared/pagination/BUILD.bazel +++ b/shared/pagination/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/params/BUILD.bazel b/shared/params/BUILD.bazel index 40768716e..59487a743 100644 --- a/shared/params/BUILD.bazel +++ b/shared/params/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/prereq/BUILD.bazel b/shared/prereq/BUILD.bazel index 3f5113f01..dfde43ebb 100644 --- a/shared/prereq/BUILD.bazel +++ b/shared/prereq/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/prometheus/BUILD.bazel b/shared/prometheus/BUILD.bazel index a7aadf8f4..04fa44b26 100644 --- a/shared/prometheus/BUILD.bazel +++ b/shared/prometheus/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/promptutil/BUILD.bazel b/shared/promptutil/BUILD.bazel index 570cc9f3e..241382ce0 100644 --- a/shared/promptutil/BUILD.bazel +++ b/shared/promptutil/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/rand/BUILD.bazel b/shared/rand/BUILD.bazel index 5c8281403..f9a47c6a4 100644 --- a/shared/rand/BUILD.bazel +++ b/shared/rand/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/runutil/BUILD.bazel b/shared/runutil/BUILD.bazel index d09447dbc..1143f5f7f 100644 --- a/shared/runutil/BUILD.bazel +++ b/shared/runutil/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/slashutil/BUILD.bazel b/shared/slashutil/BUILD.bazel index 5416b0e49..1465836d2 100644 --- a/shared/slashutil/BUILD.bazel +++ b/shared/slashutil/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/sliceutil/BUILD.bazel b/shared/sliceutil/BUILD.bazel index a4be5b8b0..ee8801ade 100644 --- a/shared/sliceutil/BUILD.bazel +++ b/shared/sliceutil/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/slotutil/BUILD.bazel b/shared/slotutil/BUILD.bazel index a5d73a0ce..4c61bfe39 100644 --- a/shared/slotutil/BUILD.bazel +++ b/shared/slotutil/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/slotutil/testing/BUILD.bazel b/shared/slotutil/testing/BUILD.bazel index a96b40169..23feded52 100644 --- a/shared/slotutil/testing/BUILD.bazel +++ b/shared/slotutil/testing/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/sszutil/BUILD.bazel b/shared/sszutil/BUILD.bazel index c71a47edc..c67065e53 100644 --- a/shared/sszutil/BUILD.bazel +++ b/shared/sszutil/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/testutil/BUILD.bazel b/shared/testutil/BUILD.bazel index 5e6230b44..f314efc35 100644 --- a/shared/testutil/BUILD.bazel +++ b/shared/testutil/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/testutil/assertions/BUILD.bazel b/shared/testutil/assertions/BUILD.bazel index 518e686c6..d1dae880e 100644 --- a/shared/testutil/assertions/BUILD.bazel +++ b/shared/testutil/assertions/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/tos/BUILD.bazel b/shared/tos/BUILD.bazel index 876e25018..ea82bbefe 100644 --- a/shared/tos/BUILD.bazel +++ b/shared/tos/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/shared/trieutil/BUILD.bazel b/shared/trieutil/BUILD.bazel index 14cccee04..0a19d62ad 100644 --- a/shared/trieutil/BUILD.bazel +++ b/shared/trieutil/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/slasher/beaconclient/BUILD.bazel b/slasher/beaconclient/BUILD.bazel index 6273ea61c..639880d91 100644 --- a/slasher/beaconclient/BUILD.bazel +++ b/slasher/beaconclient/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/slasher/cache/BUILD.bazel b/slasher/cache/BUILD.bazel index 6ec2338a5..a4cbbec4a 100644 --- a/slasher/cache/BUILD.bazel +++ b/slasher/cache/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/slasher/db/BUILD.bazel b/slasher/db/BUILD.bazel index 43a954377..9b48ea739 100644 --- a/slasher/db/BUILD.bazel +++ b/slasher/db/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/slasher/db/kv/BUILD.bazel b/slasher/db/kv/BUILD.bazel index 7365b0ecf..ca8b2894e 100644 --- a/slasher/db/kv/BUILD.bazel +++ b/slasher/db/kv/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/slasher/db/testing/BUILD.bazel b/slasher/db/testing/BUILD.bazel index b701c744a..bb8308fa3 100644 --- a/slasher/db/testing/BUILD.bazel +++ b/slasher/db/testing/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/slasher/detection/BUILD.bazel b/slasher/detection/BUILD.bazel index 571b6b27d..9426b8918 100644 --- a/slasher/detection/BUILD.bazel +++ b/slasher/detection/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/slasher/detection/attestations/BUILD.bazel b/slasher/detection/attestations/BUILD.bazel index 4f5ad5d42..28e990bde 100644 --- a/slasher/detection/attestations/BUILD.bazel +++ b/slasher/detection/attestations/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/slasher/detection/attestations/types/BUILD.bazel b/slasher/detection/attestations/types/BUILD.bazel index f54667b7f..a7a6bbbbd 100644 --- a/slasher/detection/attestations/types/BUILD.bazel +++ b/slasher/detection/attestations/types/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/slasher/detection/proposals/BUILD.bazel b/slasher/detection/proposals/BUILD.bazel index 6427bbfca..6ee893370 100644 --- a/slasher/detection/proposals/BUILD.bazel +++ b/slasher/detection/proposals/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/slasher/node/BUILD.bazel b/slasher/node/BUILD.bazel index 461050567..37f6e585f 100644 --- a/slasher/node/BUILD.bazel +++ b/slasher/node/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/slasher/rpc/BUILD.bazel b/slasher/rpc/BUILD.bazel index 771374fab..104259176 100644 --- a/slasher/rpc/BUILD.bazel +++ b/slasher/rpc/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/spectest/general/phase0/bls/BUILD.bazel b/spectest/general/phase0/bls/BUILD.bazel index cd03ba3df..508cb6685 100644 --- a/spectest/general/phase0/bls/BUILD.bazel +++ b/spectest/general/phase0/bls/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/spectest/mainnet/phase0/epoch_processing/BUILD.bazel b/spectest/mainnet/phase0/epoch_processing/BUILD.bazel index c2212f4b3..ad26efad5 100644 --- a/spectest/mainnet/phase0/epoch_processing/BUILD.bazel +++ b/spectest/mainnet/phase0/epoch_processing/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_test") go_test( name = "go_default_test", diff --git a/spectest/mainnet/phase0/finality/BUILD.bazel b/spectest/mainnet/phase0/finality/BUILD.bazel index 1960bfa2c..45d458930 100644 --- a/spectest/mainnet/phase0/finality/BUILD.bazel +++ b/spectest/mainnet/phase0/finality/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_test") go_test( name = "go_default_test", diff --git a/spectest/mainnet/phase0/operations/BUILD.bazel b/spectest/mainnet/phase0/operations/BUILD.bazel index 7b28eea43..c3e2bb654 100644 --- a/spectest/mainnet/phase0/operations/BUILD.bazel +++ b/spectest/mainnet/phase0/operations/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_test") go_test( name = "go_default_test", diff --git a/spectest/mainnet/phase0/rewards/BUILD.bazel b/spectest/mainnet/phase0/rewards/BUILD.bazel index e4c9b8f28..7d36f2b34 100644 --- a/spectest/mainnet/phase0/rewards/BUILD.bazel +++ b/spectest/mainnet/phase0/rewards/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_test") go_test( name = "go_default_test", diff --git a/spectest/mainnet/phase0/sanity/BUILD.bazel b/spectest/mainnet/phase0/sanity/BUILD.bazel index 9724c1159..9d489183d 100644 --- a/spectest/mainnet/phase0/sanity/BUILD.bazel +++ b/spectest/mainnet/phase0/sanity/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_test") go_test( name = "go_default_test", diff --git a/spectest/mainnet/phase0/shuffling/core/shuffle/BUILD.bazel b/spectest/mainnet/phase0/shuffling/core/shuffle/BUILD.bazel index 2ddb12746..fd63f6942 100644 --- a/spectest/mainnet/phase0/shuffling/core/shuffle/BUILD.bazel +++ b/spectest/mainnet/phase0/shuffling/core/shuffle/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_test") go_test( name = "go_default_test", diff --git a/spectest/mainnet/phase0/ssz_static/BUILD.bazel b/spectest/mainnet/phase0/ssz_static/BUILD.bazel index 4b0e33bdb..c09c19b96 100644 --- a/spectest/mainnet/phase0/ssz_static/BUILD.bazel +++ b/spectest/mainnet/phase0/ssz_static/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_test") go_test( name = "go_default_test", diff --git a/spectest/minimal/phase0/epoch_processing/BUILD.bazel b/spectest/minimal/phase0/epoch_processing/BUILD.bazel index 0ec97521c..880622e77 100644 --- a/spectest/minimal/phase0/epoch_processing/BUILD.bazel +++ b/spectest/minimal/phase0/epoch_processing/BUILD.bazel @@ -1,6 +1,5 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_test") -# Requires --define ssz=minimal go_test( name = "go_default_test", size = "small", @@ -20,8 +19,8 @@ go_test( data = glob(["*.yaml"]) + [ "@eth2_spec_tests_minimal//:test_data", ], + eth_network = "minimal", tags = [ - "manual", "minimal", "spectest", ], diff --git a/spectest/minimal/phase0/finality/BUILD.bazel b/spectest/minimal/phase0/finality/BUILD.bazel index dfac19ea0..26f5a1cf0 100644 --- a/spectest/minimal/phase0/finality/BUILD.bazel +++ b/spectest/minimal/phase0/finality/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_test") # Requires --define ssz=minimal go_test( @@ -8,9 +8,9 @@ go_test( data = glob(["*.yaml"]) + [ "@eth2_spec_tests_minimal//:test_data", ], + eth_network = "minimal", shard_count = 4, tags = [ - "manual", "minimal", "spectest", ], diff --git a/spectest/minimal/phase0/operations/BUILD.bazel b/spectest/minimal/phase0/operations/BUILD.bazel index 040332173..c03bbdb3b 100644 --- a/spectest/minimal/phase0/operations/BUILD.bazel +++ b/spectest/minimal/phase0/operations/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_test") # Requires --define ssz=minimal go_test( @@ -15,8 +15,8 @@ go_test( data = glob(["*.yaml"]) + [ "@eth2_spec_tests_minimal//:test_data", ], + eth_network = "minimal", tags = [ - "manual", "minimal", "spectest", ], diff --git a/spectest/minimal/phase0/rewards/BUILD.bazel b/spectest/minimal/phase0/rewards/BUILD.bazel index 8918e5029..d6c81f78c 100644 --- a/spectest/minimal/phase0/rewards/BUILD.bazel +++ b/spectest/minimal/phase0/rewards/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_test") go_test( name = "go_default_test", @@ -7,8 +7,8 @@ go_test( data = glob(["*.yaml"]) + [ "@eth2_spec_tests_minimal//:test_data", ], + eth_network = "minimal", tags = [ - "manual", "minimal", "spectest", ], diff --git a/spectest/minimal/phase0/sanity/BUILD.bazel b/spectest/minimal/phase0/sanity/BUILD.bazel index d9118c4d8..b609b0e44 100644 --- a/spectest/minimal/phase0/sanity/BUILD.bazel +++ b/spectest/minimal/phase0/sanity/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_test") # Requires --define ssz=minimal go_test( @@ -11,8 +11,8 @@ go_test( data = glob(["*.yaml"]) + [ "@eth2_spec_tests_minimal//:test_data", ], + eth_network = "minimal", tags = [ - "manual", "minimal", "spectest", ], diff --git a/spectest/minimal/phase0/shuffling/core/shuffle/BUILD.bazel b/spectest/minimal/phase0/shuffling/core/shuffle/BUILD.bazel index 389aea777..327072aa4 100644 --- a/spectest/minimal/phase0/shuffling/core/shuffle/BUILD.bazel +++ b/spectest/minimal/phase0/shuffling/core/shuffle/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_test") go_test( name = "go_default_test", @@ -7,8 +7,8 @@ go_test( data = glob(["*.yaml"]) + [ "@eth2_spec_tests_minimal//:test_data", ], + eth_network = "minimal", tags = [ - "manual", "minimal", "spectest", ], diff --git a/spectest/minimal/phase0/ssz_static/BUILD.bazel b/spectest/minimal/phase0/ssz_static/BUILD.bazel index d46aa1538..0b65e692a 100644 --- a/spectest/minimal/phase0/ssz_static/BUILD.bazel +++ b/spectest/minimal/phase0/ssz_static/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_test") go_test( name = "go_default_test", @@ -7,8 +7,8 @@ go_test( data = glob(["*.yaml"]) + [ "@eth2_spec_tests_minimal//:test_data", ], + eth_network = "minimal", tags = [ - "manual", "minimal", "spectest", ], diff --git a/spectest/utils/BUILD.bazel b/spectest/utils/BUILD.bazel index 7d3ea826c..e6acd01e3 100644 --- a/spectest/utils/BUILD.bazel +++ b/spectest/utils/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/third_party/io_bazel_rules_go_test.patch b/third_party/io_bazel_rules_go_test.patch new file mode 100644 index 000000000..d94d6f496 --- /dev/null +++ b/third_party/io_bazel_rules_go_test.patch @@ -0,0 +1,24 @@ +diff --git a/go/private/rules/test.bzl b/go/private/rules/test.bzl +index a7936ca9..cbfc996a 100644 +--- a/go/private/rules/test.bzl ++++ b/go/private/rules/test.bzl +@@ -176,7 +176,7 @@ def _go_test_impl(ctx): + ), + ] + +-_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"], + } + +-go_test = rule(**_go_test_kwargs) +-go_transition_test = go_transition_rule(**_go_test_kwargs) ++go_test = rule(**go_test_kwargs) ++go_transition_test = go_transition_rule(**go_test_kwargs) + + def _recompile_external_deps(go, external_source, internal_archive, library_labels): + """Recompiles some archives in order to split internal and external tests. diff --git a/tools/analyzers/errcheck/BUILD.bazel b/tools/analyzers/errcheck/BUILD.bazel index c09714d53..22a2eff37 100644 --- a/tools/analyzers/errcheck/BUILD.bazel +++ b/tools/analyzers/errcheck/BUILD.bazel @@ -1,5 +1,5 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test", "go_tool_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") +load("@io_bazel_rules_go//go:def.bzl", "go_tool_library") go_library( name = "go_default_library", diff --git a/tools/bootnode/BUILD.bazel b/tools/bootnode/BUILD.bazel index 8b6c48b95..1e1b61b00 100644 --- a/tools/bootnode/BUILD.bazel +++ b/tools/bootnode/BUILD.bazel @@ -1,5 +1,5 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") +load("@io_bazel_rules_go//go:def.bzl", "go_binary") load("@io_bazel_rules_docker//go:image.bzl", "go_image") load("@io_bazel_rules_docker//container:container.bzl", "container_bundle") load("@io_bazel_rules_docker//contrib:push-all.bzl", "docker_push") diff --git a/tools/cluster-pk-manager/server/BUILD.bazel b/tools/cluster-pk-manager/server/BUILD.bazel index db520e0c4..869561a78 100644 --- a/tools/cluster-pk-manager/server/BUILD.bazel +++ b/tools/cluster-pk-manager/server/BUILD.bazel @@ -1,5 +1,5 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") +load("@io_bazel_rules_go//go:def.bzl", "go_binary") load("@io_bazel_rules_docker//go:image.bzl", "go_image") load("@io_bazel_rules_docker//container:container.bzl", "container_bundle") load("@io_bazel_rules_docker//contrib:push-all.bzl", "docker_push") diff --git a/tools/genesis-state-gen/BUILD.bazel b/tools/genesis-state-gen/BUILD.bazel index 7ec4f62b1..77ad67917 100644 --- a/tools/genesis-state-gen/BUILD.bazel +++ b/tools/genesis-state-gen/BUILD.bazel @@ -1,5 +1,5 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") +load("@io_bazel_rules_go//go:def.bzl", "go_binary") load("@io_bazel_rules_docker//go:image.bzl", "go_image") load("@io_bazel_rules_docker//container:container.bzl", "container_bundle") load("@io_bazel_rules_docker//contrib:push-all.bzl", "docker_push") diff --git a/tools/go/def.bzl b/tools/go/def.bzl index 0d1271f3e..0176f25a7 100644 --- a/tools/go/def.bzl +++ b/tools/go/def.bzl @@ -1,6 +1,51 @@ -load("@io_bazel_rules_go//go:def.bzl", _go_library = "go_library") +load("@io_bazel_rules_go//go/private/rules:library.bzl", _go_library = "go_library") +load("@io_bazel_rules_go//go/private/rules:test.bzl", "go_test_kwargs") load("@bazel_gazelle//:deps.bzl", _go_repository = "go_repository") +def _go_test_transition_impl(settings, attr): + """Edge transition to add minimal or mainnet build tags""" + settings = dict(settings) + + if attr.eth_network == "minimal": + settings["//proto:network"] = "minimal" + settings["@io_bazel_rules_go//go/config:tags"] += ["minimal"] + elif attr.eth_network == "mainnet": # Default / optional + settings["//proto:network"] = "mainnet" + settings["@io_bazel_rules_go//go/config:tags"] += ["mainnet"] + + if attr.gotags: + settings["@io_bazel_rules_go//go/config:tags"] += attr.gotags + + return settings + +go_test_transition = transition( + implementation = _go_test_transition_impl, + inputs = [ + "@io_bazel_rules_go//go/config:tags", + "//proto:network", + ], + outputs = [ + "@io_bazel_rules_go//go/config:tags", + "//proto:network", + ], +) + +def _go_test_transition_rule(**kwargs): + """A wrapper around go_test to add an eth_network attribute and incoming edge transition to support compile time configuration""" + kwargs = dict(kwargs) + attrs = dict(kwargs["attrs"]) + attrs.update({ + "eth_network": attr.string(values = ["mainnet", "minimal"]), + "_whitelist_function_transition": attr.label( + default = "@bazel_tools//tools/whitelists/function_transition_whitelist", + ), + }) + kwargs["attrs"] = attrs + kwargs["cfg"] = go_test_transition + return rule(**kwargs) + +go_test = _go_test_transition_rule(**go_test_kwargs) + def go_library(name, **kwargs): gc_goopts = [] diff --git a/tools/http-request-sink/BUILD.bazel b/tools/http-request-sink/BUILD.bazel index dd6651c7b..9002c1a4a 100644 --- a/tools/http-request-sink/BUILD.bazel +++ b/tools/http-request-sink/BUILD.bazel @@ -1,5 +1,5 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") +load("@io_bazel_rules_go//go:def.bzl", "go_binary") load("@io_bazel_rules_docker//go:image.bzl", "go_image") load("@io_bazel_rules_docker//container:container.bzl", "container_bundle") load("@io_bazel_rules_docker//contrib:push-all.bzl", "docker_push") diff --git a/tools/interop/split-keys/BUILD.bazel b/tools/interop/split-keys/BUILD.bazel index bb70f6031..8aa41915c 100644 --- a/tools/interop/split-keys/BUILD.bazel +++ b/tools/interop/split-keys/BUILD.bazel @@ -1,5 +1,5 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@io_bazel_rules_go//go:def.bzl", "go_binary") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/tools/keystores/BUILD.bazel b/tools/keystores/BUILD.bazel index 3fb4d3ec6..0a154ad32 100644 --- a/tools/keystores/BUILD.bazel +++ b/tools/keystores/BUILD.bazel @@ -1,5 +1,5 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@io_bazel_rules_go//go:def.bzl", "go_binary") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/tools/unencrypted-keys-gen/BUILD.bazel b/tools/unencrypted-keys-gen/BUILD.bazel index b92be0dd9..6dfb90aeb 100644 --- a/tools/unencrypted-keys-gen/BUILD.bazel +++ b/tools/unencrypted-keys-gen/BUILD.bazel @@ -1,5 +1,5 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") +load("@io_bazel_rules_go//go:def.bzl", "go_binary") go_library( name = "go_default_library", diff --git a/validator/accounts/BUILD.bazel b/validator/accounts/BUILD.bazel index 119263ac9..155ab5136 100644 --- a/validator/accounts/BUILD.bazel +++ b/validator/accounts/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/validator/accounts/wallet/BUILD.bazel b/validator/accounts/wallet/BUILD.bazel index 23845754a..dde94a2a8 100644 --- a/validator/accounts/wallet/BUILD.bazel +++ b/validator/accounts/wallet/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/validator/client/BUILD.bazel b/validator/client/BUILD.bazel index 1842e962c..046c3f07b 100644 --- a/validator/client/BUILD.bazel +++ b/validator/client/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/validator/db/BUILD.bazel b/validator/db/BUILD.bazel index 539f2f654..aa276d651 100644 --- a/validator/db/BUILD.bazel +++ b/validator/db/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/validator/db/kv/BUILD.bazel b/validator/db/kv/BUILD.bazel index e6ee192f5..220ef0bb3 100644 --- a/validator/db/kv/BUILD.bazel +++ b/validator/db/kv/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/validator/db/testing/BUILD.bazel b/validator/db/testing/BUILD.bazel index 391f76431..01377a09f 100644 --- a/validator/db/testing/BUILD.bazel +++ b/validator/db/testing/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/validator/graffiti/BUILD.bazel b/validator/graffiti/BUILD.bazel index eff9a265b..1a9a1dc51 100644 --- a/validator/graffiti/BUILD.bazel +++ b/validator/graffiti/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/validator/keymanager/BUILD.bazel b/validator/keymanager/BUILD.bazel index 6ae27f5b6..5fad5f503 100644 --- a/validator/keymanager/BUILD.bazel +++ b/validator/keymanager/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/validator/keymanager/derived/BUILD.bazel b/validator/keymanager/derived/BUILD.bazel index 91132cdab..c03e40b89 100644 --- a/validator/keymanager/derived/BUILD.bazel +++ b/validator/keymanager/derived/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/validator/keymanager/imported/BUILD.bazel b/validator/keymanager/imported/BUILD.bazel index 2e6451fa9..48ac60fd5 100644 --- a/validator/keymanager/imported/BUILD.bazel +++ b/validator/keymanager/imported/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/validator/keymanager/remote/BUILD.bazel b/validator/keymanager/remote/BUILD.bazel index 4fa02c133..b01a96738 100644 --- a/validator/keymanager/remote/BUILD.bazel +++ b/validator/keymanager/remote/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/validator/node/BUILD.bazel b/validator/node/BUILD.bazel index 698436a17..5f90dd951 100644 --- a/validator/node/BUILD.bazel +++ b/validator/node/BUILD.bazel @@ -1,5 +1,4 @@ -load("@prysm//tools/go:def.bzl", "go_library") -load("@io_bazel_rules_go//go:def.bzl", "go_test") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_test( name = "go_default_test", diff --git a/validator/rpc/BUILD.bazel b/validator/rpc/BUILD.bazel index 02ccc4ad4..01c002afe 100644 --- a/validator/rpc/BUILD.bazel +++ b/validator/rpc/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/validator/slashing-protection/BUILD.bazel b/validator/slashing-protection/BUILD.bazel index 9612841bb..e9bb76a6d 100644 --- a/validator/slashing-protection/BUILD.bazel +++ b/validator/slashing-protection/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/validator/slashing-protection/local/standard-protection-format/BUILD.bazel b/validator/slashing-protection/local/standard-protection-format/BUILD.bazel index 8c085467b..75fc7d107 100644 --- a/validator/slashing-protection/local/standard-protection-format/BUILD.bazel +++ b/validator/slashing-protection/local/standard-protection-format/BUILD.bazel @@ -1,5 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") -load("@prysm//tools/go:def.bzl", "go_library") +load("@prysm//tools/go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library",