Open jbedard opened 1 week ago
I will try to create a PR next week if I find some time. Do you know how to deduce the -repo_config
path of the top of your head?
I can also add that this is not a problem with bzlmod and rules_go when you use go mod vendor
for all depedencies. It only manifests when we remove vendoring and use:
# MODULE.bazel
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
I will try to create a PR next week if I find some time. Do you know how to deduce the
-repo_config
path of the top of your head?
Hmm, this is more complicated than I first thought. Does aspect configure
need to run bazel first to generate the gazelle~~go_deps~bazel_gazelle_go_repository_config/WORKSPACE
repository that contains the go_repository(...)
declarations?
The WORKSPACE
files looks something like that:
go_repository(
name = "@gazelle~",
importpath = "github.com/bazelbuild/bazel-gazelle",
module_name = "gazelle",
)
go_repository(
name = "@rules_go~",
importpath = "github.com/bazelbuild/rules_go",
module_name = "rules_go",
)
go_repository(
name = "co_honnef_go_tools",
importpath = "honnef.co/go/tools",
)
...
What happened?
Crashes or really slow when updating go deps in bzlmod.
Version
Development (host) and target OS/architectures:
Output of
bazel --version
:Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file:Language(s) and/or frameworks involved:
How to reproduce
Any other information?
See fix in gazelle sh script: https://github.com/bazel-contrib/bazel-gazelle/blob/b160ccd46fb7c19a49530d08906165c73c343dd1/internal/gazelle.bash.in#L101-L106