-
Notifications
You must be signed in to change notification settings - Fork 856
Expand file tree
/
Copy pathMODULE.bazel
More file actions
157 lines (148 loc) · 5.65 KB
/
Copy pathMODULE.bazel
File metadata and controls
157 lines (148 loc) · 5.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
module(
name = "avalanchego",
version = "0.0.0",
)
bazel_dep(name = "rules_go", version = "0.59.0", repo_name = "io_bazel_rules_go")
bazel_dep(name = "gazelle", version = "0.51.3", repo_name = "bazel_gazelle")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "buildifier_prebuilt", version = "8.5.1.2")
# Go SDK - reads version from go.mod (ensured consistent with all go.mod files)
go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
go_sdk.from_file(go_mod = "//:go.mod")
# Go dependencies from go.work (aggregates all go.mod files)
go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_work = "//:go.work")
# Go-based repo tools used via Bazel fallback in CI.
tool_go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps", isolate = True)
tool_go_deps.from_file(go_mod = "//tools/external:go.mod")
# Patches for external dependencies that need custom BUILD files or fixes.
# See docs/bazel.md "Patched Dependencies" for details on each override.
GO_OVERRIDES = {
"github.com/supranational/blst": {
"build_gen": "off",
"patches": ["//.bazel/patches:com_github_supranational_blst.patch"],
},
"github.com/ava-labs/firewood-go-ethhash/ffi": {
"build_gen": "off",
"patches": ["//.bazel/patches:com_github_ava_labs_firewood_go_ethhash_ffi.patch"],
},
"github.com/consensys/gnark-crypto": {
"patches": ["//.bazel/patches:com_github_consensys_gnark_crypto_asm_includes.patch"],
},
"github.com/ava-labs/libevm": {
"patches": ["//.bazel/patches:com_github_ava_labs_libevm.patch"],
"gazelle_directives": ["gazelle:exclude crypto/secp256k1/**"],
},
}
[go_deps.module_override(
patch_strip = 1,
patches = o.get("patches", []),
path = path,
) for path, o in GO_OVERRIDES.items()]
[go_deps.gazelle_override(
build_file_generation = o.get("build_gen", "on"),
directives = o.get("gazelle_directives", []),
path = path,
) for path, o in GO_OVERRIDES.items()]
# Workspace modules (avalanchego, graft/*) are built from the local source
# tree, so they do not need use_repo bindings here. Omitting those generated
# local-path repos also keeps `bazel fetch //...` from traversing personal
# workspace state like .agents/ and broken local symlinks while fetching all
# imported external repos.
use_repo(
go_deps,
"com_connectrpc_connect",
"com_connectrpc_grpcreflect",
"com_github_antithesishq_antithesis_sdk_go",
"com_github_arr4n_shed",
"com_github_ava_labs_firewood_go_ethhash_ffi",
"com_github_ava_labs_libevm",
"com_github_ava_labs_simplex",
"com_github_btcsuite_btcd_btcutil",
"com_github_cespare_xxhash_v2",
"com_github_cockroachdb_pebble",
"com_github_compose_spec_compose_go",
"com_github_datadog_zstd",
"com_github_davecgh_go_spew",
"com_github_deckarep_golang_set_v2",
"com_github_decred_dcrd_dcrec_secp256k1_v4",
"com_github_fjl_gencodec",
"com_github_go_cmd_cmd",
"com_github_google_btree",
"com_github_google_go_cmp",
"com_github_google_renameio_v2",
"com_github_google_uuid",
"com_github_gorilla_mux",
"com_github_gorilla_rpc",
"com_github_gorilla_websocket",
"com_github_grpc_ecosystem_go_grpc_prometheus",
"com_github_hashicorp_go_bexpr",
"com_github_hashicorp_golang_lru",
"com_github_holiman_billy",
"com_github_holiman_bloomfilter_v2",
"com_github_holiman_uint256",
"com_github_huin_goupnp",
"com_github_jackpal_gateway",
"com_github_jackpal_go_nat_pmp",
"com_github_leanovate_gopter",
"com_github_mattn_go_colorable",
"com_github_mattn_go_isatty",
"com_github_mitchellh_mapstructure",
"com_github_mr_tron_base58",
"com_github_nbutton23_zxcvbn_go",
"com_github_onsi_ginkgo_v2",
"com_github_pires_go_proxyproto",
"com_github_prometheus_client_golang",
"com_github_prometheus_client_model",
"com_github_prometheus_common",
"com_github_rs_cors",
"com_github_shirou_gopsutil",
"com_github_spf13_cast",
"com_github_spf13_cobra",
"com_github_spf13_pflag",
"com_github_spf13_viper",
"com_github_stephenbuttolph_canoto",
"com_github_stretchr_testify",
"com_github_supranational_blst",
"com_github_syndtr_goleveldb",
"com_github_thepudds_fzgen",
"com_github_tyler_smith_go_bip39",
"com_github_urfave_cli_v2",
"com_github_victoriametrics_fastcache",
"in_gopkg_natefinch_lumberjack_v2",
"in_gopkg_yaml_v3",
"io_k8s_api",
"io_k8s_apimachinery",
"io_k8s_client_go",
"io_k8s_utils",
"io_opentelemetry_go_otel",
"io_opentelemetry_go_otel_exporters_otlp_otlptrace",
"io_opentelemetry_go_otel_exporters_otlp_otlptrace_otlptracegrpc",
"io_opentelemetry_go_otel_exporters_otlp_otlptrace_otlptracehttp",
"io_opentelemetry_go_otel_sdk",
"io_opentelemetry_go_otel_trace",
"org_golang_google_genproto",
"org_golang_google_genproto_googleapis_rpc",
"org_golang_google_grpc",
"org_golang_google_protobuf",
"org_golang_x_crypto",
"org_golang_x_exp",
"org_golang_x_net",
"org_golang_x_sync",
"org_golang_x_term",
"org_golang_x_time",
"org_golang_x_tools",
"org_gonum_v1_gonum",
"org_uber_go_goleak",
"org_uber_go_mock",
"org_uber_go_zap",
)
use_repo(
tool_go_deps,
"com_github_go_task_task_v3",
tool_com_github_fjl_gencodec = "com_github_fjl_gencodec",
tool_com_github_golangci_golangci_lint_v2 = "com_github_golangci_golangci_lint_v2",
tool_com_github_palantir_go_license = "com_github_palantir_go_license",
tool_com_github_rhysd_actionlint = "com_github_rhysd_actionlint",
)