Repository navigation
Expand file tree
/
Copy pathMODULE.bazel
More file actions
147 lines (128 loc) · 5.19 KB
/
Copy pathMODULE.bazel
File metadata and controls
147 lines (128 loc) · 5.19 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
# 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 = "git", version = "2.55.0")
bazel_dep(name = "rules_go", version = "0.59.0")
bazel_dep(name = "gazelle", version = "0.53.0")
bazel_dep(name = "rules_proto", version = "7.1.0")
bazel_dep(name = "aspect_rules_js", version = "3.5.0")
bazel_dep(name = "aspect_rules_ts", version = "3.10.1")
bazel_dep(name = "rules_nodejs", version = "6.7.3")
bazel_dep(name = "rules_oci", version = "2.3.0")
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "rules_playwright", version = "0.5.3")
bazel_dep(name = "rules_python", version = "2.2.0")
bazel_dep(name = "bazel_lib", version = "3.7.2")
bazel_dep(name = "platforms", version = "1.1.0")
bazel_dep(name = "rules_docker_compose", version = "0.4.0", dev_dependency = True)
single_version_override(
module_name = "git",
version = "2.55.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")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
node.toolchain(node_version = "22.20.0")
typescript = use_extension("@aspect_rules_ts//ts:extensions.bzl", "typescript")
typescript.deps(version_from = "//web:package.json")
use_repo(typescript, "npm_typescript")
npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
name = "npm",
pnpm_lock = "//web:pnpm-lock.yaml",
)
use_repo(npm, "npm")
playwright = use_extension("@rules_playwright//playwright:extensions.bzl", "playwright")
playwright.repo(
name = "playwright",
integrity_path_map = {
"builds/chromium/1193/chromium-linux.zip": "sha256-AzVW84unLl+wfBqcmm4P9WtYI8LMQF4DS6V2OmLirRI=",
"builds/chromium/1193/chromium-mac-arm64.zip": "sha256-v7p0571A21zCoO9gPsm6kXNs9ragg2wnpZabV7gES2E=",
},
playwright_version = "1.55.1",
)
use_repo(playwright, "playwright")
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
oci.pull(
name = "node_22_20_0_bookworm_slim",
digest = "sha256:b21fe589dfbe5cc39365d0544b9be3f1f33f55f3c86c87a76ff65a02f8f5848e",
image = "node",
platforms = ["linux/amd64"],
)
oci.pull(
name = "mysql_8_0",
digest = "sha256:7dcddc01f13bab2f15cde676d44d01f61fc9f99fe7785e86196dfc07d358ae2b",
image = "mysql",
platforms = ["linux/amd64"],
)
use_repo(
oci,
"mysql_8_0",
"mysql_8_0_linux_amd64",
"node_22_20_0_bookworm_slim",
"node_22_20_0_bookworm_slim_linux_amd64",
)
GO_VERSION = "1.25.0"
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_golang_x_sync",
"org_golang_x_term",
"org_uber_go_fx",
"org_uber_go_mock",
"org_uber_go_yarpc",
"org_uber_go_zap",
)
# Python toolchain and PyPI packages for the documentation site (//tool/docsite).
# Its targets pin this version, so the default toolchain other Python targets use
# is unchanged. Regenerate the lock with: bazel run //tool/docsite:requirements.update
DOCSITE_PYTHON_VERSION = "3.13"
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(python_version = DOCSITE_PYTHON_VERSION)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "docsite_pip",
python_version = DOCSITE_PYTHON_VERSION,
requirements_lock = "//tool/docsite:requirements_lock.txt",
)
use_repo(pip, "docsite_pip")