-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMODULE.bazel
More file actions
66 lines (57 loc) · 2.37 KB
/
Copy pathMODULE.bazel
File metadata and controls
66 lines (57 loc) · 2.37 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
# Listed first so its protoc toolchain wins resolution over the protobuf module's,
# which is pulled in transitively by rules_go/rules_proto.
bazel_dep(name = "toolchains_protoc", version = "0.6.1")
bazel_dep(name = "rules_go", version = "0.57.0")
bazel_dep(name = "gazelle", version = "0.45.0")
bazel_dep(name = "rules_proto", version = "7.1.0")
# Direct dep so the well-known type proto_library targets (e.g.
# @protobuf//:descriptor_proto, needed by the message queue topics option that
# extends google.protobuf.MessageOptions) are visible by apparent name.
# Toolchain resolution is unaffected: toolchains_protoc is registered first.
bazel_dep(name = "protobuf", version = "29.1")
# Use a prebuilt protoc binary instead of compiling protoc (and its abseil/upb
# dependencies) from source on every cold build. Requires
# --incompatible_enable_proto_toolchain_resolution (set in .bazelrc).
protoc = use_extension("@toolchains_protoc//protoc:extensions.bzl", "protoc")
protoc.toolchain(
version = "v29.3",
)
use_repo(protoc, "toolchains_protoc_hub")
register_toolchains("@toolchains_protoc_hub//:all")
GO_VERSION = "1.24.5"
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
# Download a hermetic Go SDK for the host OS/arch and common remote execution
# platforms using the version pinned in `go.mod`. No host Go install is required.
go_sdk.from_file(go_mod = "//:go.mod")
# Also download a linux/amd64 SDK so the Docker images can be cross-compiled
# (see the `build-*-linux` Make targets) from any host.
go_sdk.download(
goarch = "amd64",
goos = "linux",
version = GO_VERSION,
)
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
go_deps.module(
path = "google.golang.org/grpc/cmd/protoc-gen-go-grpc",
sum = "h1:F29+wU6Ee6qgu9TddPgooOdaqsxTMunOoj8KA5yuS5A=",
version = "v1.5.1",
)
# All *direct* Go dependencies of the module have to be listed explicitly
use_repo(
go_deps,
"com_github_data_dog_go_sqlmock",
"com_github_go_sql_driver_mysql",
"com_github_spf13_cobra",
"com_github_stretchr_testify",
"com_github_uber_go_tally",
"in_gopkg_yaml_v3",
"org_golang_google_grpc",
"org_golang_google_grpc_cmd_protoc_gen_go_grpc",
"org_golang_google_protobuf",
"org_golang_x_oauth2",
"org_uber_go_fx",
"org_uber_go_mock",
"org_uber_go_yarpc",
"org_uber_go_zap",
)