Closed liushuai05 closed 2 months ago
The recommended way to use rules_go is via Bzlmod/MODULE.bazel
. See our docs on how to manage external dependencies in a way that reuses the information in go.mod
and makes it unnecessary to run update-repos
.
Let me know if anything is missing to realize a good workflow for your project.
What version of rules_go are you using?
0.48.0
What version of gazelle are you using?
0.37.0
What version of Bazel are you using?
7.2.1
Does this issue reproduce with the latest releases of all the above?
yes
What operating system and processor architecture are you using?
manjaro 24 x86-64
Any other potentially useful information about your toolchain?
Nothing
What did you do?
1.I introduced a dependency in lib such as "github.com/redis/go-redis/v9" 2.Then I executed bazel run//:gazelle-update-repos to successfully update the dependency file deps.bzl, and then I executed bazel run //:xxx to compile bin, and I got an error. 3.
What did you expect to see?
I hope it compiles normally. I have to manually update the deps in BUILD.bazel under the lib package and add a line "@ com github redis go redis _ v 9//:go-redis" to compile normally, but many of my projects have not used bazel before and want to migrate to bazel mutation. This is undoubtedly a big project, and I have tried to find a solution, but it seems that there is no progress.
What did you see instead?