forked from bazel-contrib/bazel-gazelle
-
Notifications
You must be signed in to change notification settings - Fork 1
/
MODULE.bazel
66 lines (56 loc) · 2.06 KB
/
MODULE.bazel
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
module(
name = "gazelle",
version = "0.35.0",
repo_name = "bazel_gazelle",
)
bazel_dep(name = "bazel_skylib", version = "1.5.0")
bazel_dep(name = "protobuf", version = "3.19.6", repo_name = "com_google_protobuf")
bazel_dep(name = "rules_go", version = "0.44.0", repo_name = "io_bazel_rules_go")
bazel_dep(name = "rules_proto", version = "4.0.0")
go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
# Known to exist since it is instantiated by rules_go itself.
use_repo(
go_sdk,
"go_host_compatible_sdk_label",
)
non_module_deps = use_extension("//internal/bzlmod:non_module_deps.bzl", "non_module_deps")
use_repo(
non_module_deps,
"bazel_gazelle_go_repository_cache",
"bazel_gazelle_go_repository_tools",
"bazel_gazelle_is_bazel_module",
)
go_deps = use_extension("//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
# golang.org/x/tools is not a direct dependency of the go code anymore
# but bazel buildtools and nogo depend on it.
go_deps.module(
path = "golang.org/x/tools",
sum = "h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8=",
version = "v0.15.0",
)
use_repo(
go_deps,
"com_github_bazelbuild_buildtools",
"com_github_bmatcuk_doublestar_v4",
"com_github_fsnotify_fsnotify",
"com_github_google_go_cmp",
"com_github_pmezard_go_difflib",
"org_golang_x_mod",
"org_golang_x_sync",
"org_golang_x_tools",
"org_golang_x_tools_go_vcs",
# Referenced by `gazelle_binary`.
"bazel_gazelle_go_repository_config",
# Dependencies of rules_go that require special handling in go_deps.
"com_github_golang_protobuf",
"org_golang_google_protobuf",
)
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.4.1", dev_dependency = True)
bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True, repo_name = "io_bazel_stardoc")
go_sdk_dev = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk", dev_dependency = True)
# Known to exist since it is instantiated by rules_go itself.
use_repo(
go_sdk_dev,
go_sdk = "go_default_sdk",
)