-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMODULE.bazel
More file actions
97 lines (80 loc) · 3.1 KB
/
MODULE.bazel
File metadata and controls
97 lines (80 loc) · 3.1 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
# Go
bazel_dep(name = "rules_go", version = "0.53.0")
bazel_dep(name = "bazel_skylib", version = "1.8.1")
# Staticcheck analyzers for nogo (bzlmod-compatible)
bazel_dep(name = "nogo_analyzer_bzlmod", version = "0.1.0")
# Configure Go version for Termux compatibility
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.24.4")
go_sdk.nogo(nogo = "//tools/lint:platform_nogo")
use_repo(go_sdk, "go_default_sdk")
bazel_dep(name = "gazelle", version = "0.42.0")
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
# Explicitly declare golang.org/x/tools for nogo ADDITIONAL_GOVET analyzers
# This prevents bazel mod tidy from removing it as an "indirect" dependency
go_deps.module(
path = "golang.org/x/tools",
sum = "h1:yLkxfA+Qnul4cs9QA3KnlFu0lVmd8JJfoq+E41uSutA=",
version = "v0.40.0",
)
# All Go dependencies referenced by BUILD files must be listed explicitly.
# Note: This includes both direct and indirect dependencies from go.mod.
# gazelle:repository_macro go_deps.bzl%go_repositories
use_repo(
go_deps,
"com_github_apple_pkl_go",
"com_github_google_renameio_v2",
"com_github_google_uuid",
"com_github_jaeyeom_go_cmdexec",
"com_github_jaeyeom_sugo",
"com_github_leanovate_gopter",
"com_github_mattn_go_sqlite3",
"com_github_slack_go_slack",
"com_github_spf13_cobra",
"com_github_spf13_viper",
"in_gopkg_yaml_v3",
"org_golang_x_sys",
"org_golang_x_tools",
"org_modernc_sqlite",
)
# Aspect rules for linting and formatting
bazel_dep(name = "aspect_rules_lint", version = "1.10.1")
# Buildifier for Bazel file formatting
bazel_dep(name = "buildifier_prebuilt", version = "8.0.3")
# Stardoc for Bazel documentation (required by rules_buf)
# repo_name provides the legacy @io_bazel_stardoc alias that rules_buf expects
bazel_dep(name = "stardoc", version = "0.8.0", repo_name = "io_bazel_stardoc")
# Buf rules for protocol buffer formatting
bazel_dep(name = "rules_buf", version = "0.5.2")
# Configure Buf toolchain
buf = use_extension("@rules_buf//buf:extensions.bzl", "buf")
# Use the latest buf CLI version
buf.toolchains(
sha256 = "736e74d1697dcf253bc60b2f0fb4389c39dbc7be68472a7d564a953df8b19d12",
version = "v1.50.0",
)
# Make buf CLI available for direct usage
use_repo(buf, "rules_buf_toolchains")
# Python
bazel_dep(name = "rules_python", version = "1.0.0")
# Pip dependencies
pip_ext = use_extension(
"@rules_python//python/extensions:pip.bzl",
"pip",
)
pip_ext.parse(
hub_name = "main_pip_deps", # Changed to avoid conflict
python_version = "3.11",
requirements_lock = "//:requirements.txt",
)
use_repo(pip_ext, "main_pip_deps") # Make @main_pip_deps available
# Pkl for configuration
bazel_dep(name = "rules_pkl", version = "0.13.1")
pkl = use_extension("@rules_pkl//pkl/extensions:pkl.bzl", "pkl")
pkl.project(
name = "pkl_project",
pkl_project = "//:PklProject",
pkl_project_deps = "//:PklProject.deps.json",
)
use_repo(pkl, "pkl-cli-linux-aarch64", "pkl-cli-linux-amd64", "pkl-cli-macos-aarch64", "pkl-cli-macos-amd64", "pkl_project")