treewide: migrate external rules to bzlmod
This is a huge one as it was very annoying to migrate them separately. This migrates rules_go, gazelle, rust_rust, protobuf to bzlmod
Change-Id: If39591d43ed4c2afa2979ee5915e9d1cfa1574a9
Reviewed-on: https://review.monogon.dev/c/monogon/+/3234
Tested-by: Jenkins CI
Reviewed-by: Leopold Schabel <leo@monogon.tech>
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
diff --git a/third_party/go/README.md b/third_party/go/README.md
index dc7d7ca..1d4cbe9 100644
--- a/third_party/go/README.md
+++ b/third_party/go/README.md
@@ -7,15 +7,11 @@
.--------.
| go.mod |------------.
'--------' |
- | go mod tidy | bazel //:gazelle-update-repos
+ | go mod tidy |
V |
.--------. |
| go.sum |-----------.|
'--------' |
- V
- .---------------------------------.
- | third_party/go/repositories.bzl |
- '---------------------------------'
| bazel run //:gazelle
V
.----------------.
@@ -34,7 +30,6 @@
Add a Go dependency to your code, then:
$ go mod tidy
- $ bazel run //:gazelle-update-repos
All generated sources (eg. protobuf stubs) that are usually built by Bazel are invisible to go(mod)-based tooling. To get around this, we place `gomod-generated-placeholder.go` files in package directories that would otherwise contain generated files. These are ignored by Gazelle (and thus by Bazel builds) but not by go(mod)-based tooling.