Automatically prune unused Go dependencies
The way gazelle was set up meant that it would never prune any
dependencies from go_deps.bzl. I'm not exactly sure _why_, but that's
the way it behaved.
The new approach here in this patch is to essentially null out
go_deps.bzl and have gazelle regenerate it from scratch.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: Ic94020df816afa0df798b19b16b11272579793be
diff --git a/tools/go/BUILD b/tools/go/BUILD
index 25b3adb..2c251a0 100644
--- a/tools/go/BUILD
+++ b/tools/go/BUILD
@@ -6,6 +6,13 @@
srcs = [
"mirror_lib.py",
],
+ data = [
+ "@com_github_bazelbuild_buildtools//buildifier",
+ ],
+ target_compatible_with = ["@platforms//cpu:x86_64"],
+ deps = [
+ "@bazel_tools//tools/python/runfiles",
+ ],
)
py_binary(
@@ -25,13 +32,12 @@
"mirror_go_repos.py",
],
data = [
- "@com_github_bazelbuild_buildtools//buildifier",
"@go_sdk//:bin/go",
],
target_compatible_with = ["@platforms//cpu:x86_64"],
+ visibility = ["//visibility:public"],
deps = [
":mirror_lib",
- "@bazel_tools//tools/python/runfiles",
],
)