workspace: rules_go, gazelle, go, gVisor update
This commit not only updates rules_go and friends, but also updates
gVisor, removes legacy protobuf usage and switches from using
build_configuration to a config flag for bazel
Change-Id: Idb383f35ca0fec4cb7329e9d991f08f28cf9b1fb
Reviewed-on: https://review.monogon.dev/c/monogon/+/2129
Tested-by: Jenkins CI
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
diff --git a/build/analysis/nogo_config.json b/build/analysis/nogo_config.json
index 06cb4c4..6d9cc8e 100644
--- a/build/analysis/nogo_config.json
+++ b/build/analysis/nogo_config.json
@@ -26,6 +26,11 @@
"external/bazel_gazelle/walk": "third_party"
}
},
+ "shift": {
+ "exclude_files": {
+ "external/dev_gvisor_gvisor/": "third_party"
+ }
+ },
"unsafeptr": {
"exclude_files": {
"external/com_github_modern_go_reflect2/": "third_party",
diff --git a/build/bazel_cc_fix/BUILD.bazel b/build/bazel_cc_fix/BUILD.bazel
index 3b2f197..522cad4 100644
--- a/build/bazel_cc_fix/BUILD.bazel
+++ b/build/bazel_cc_fix/BUILD.bazel
@@ -7,8 +7,8 @@
visibility = ["//visibility:private"],
deps = [
"//build/bazel_cc_fix/ccfixspec",
- "@com_github_golang_protobuf//proto:go_default_library",
"@com_github_mattn_go_shellwords//:go-shellwords",
+ "@org_golang_google_protobuf//encoding/prototext",
],
)
diff --git a/build/bazel_cc_fix/main.go b/build/bazel_cc_fix/main.go
index 611f1eb..2e69110 100644
--- a/build/bazel_cc_fix/main.go
+++ b/build/bazel_cc_fix/main.go
@@ -40,8 +40,8 @@
"regexp"
"strings"
- "github.com/golang/protobuf/proto"
"github.com/mattn/go-shellwords"
+ "google.golang.org/protobuf/encoding/prototext"
"source.monogon.dev/build/bazel_cc_fix/ccfixspec"
)
@@ -329,7 +329,7 @@
}
specRaw, err := os.ReadFile(*specPath)
var spec ccfixspec.CCFixSpec
- if err := proto.UnmarshalText(string(specRaw), &spec); err != nil {
+ if err := prototext.Unmarshal(specRaw, &spec); err != nil {
log.Fatalf("failed to load spec: %v", err)
}
diff --git a/build/ci/jenkins-presubmit.groovy b/build/ci/jenkins-presubmit.groovy
index 02a3a98..d5ad565 100644
--- a/build/ci/jenkins-presubmit.groovy
+++ b/build/ci/jenkins-presubmit.groovy
@@ -24,7 +24,7 @@
sh "JENKINS_NODE_COOKIE=dontKillMe bazelisk test //..."
sh "JENKINS_NODE_COOKIE=dontKillMe bazelisk build --//metropolis/cli/metroctl:buildkind=lite --platforms=@io_bazel_rules_go//go/toolchain:darwin_arm64 //metropolis/cli/metroctl"
sh "JENKINS_NODE_COOKIE=dontKillMe bazelisk build --//metropolis/cli/metroctl:buildkind=lite --platforms=@io_bazel_rules_go//go/toolchain:darwin_amd64 //metropolis/cli/metroctl"
- sh "JENKINS_NODE_COOKIE=dontKillMe bazelisk test -c dbg //..."
+ sh "JENKINS_NODE_COOKIE=dontKillMe bazelisk test --config dbg //..."
}
post {
success {