Update rules_go and gazelle to 0.42 & 0.33 (latest releases) (#13021)

* Provide @go_googleapis, update gazelle

* fix pb build failures

Fix build issues with grpc-gateway
This commit is contained in:
Preston Van Loon
2023-10-09 23:50:29 -05:00
committed by GitHub
parent 0bd232667b
commit 8eb82dd378
71 changed files with 588 additions and 527 deletions

View File

@@ -0,0 +1,12 @@
diff --git a/internal/descriptor/apiconfig/BUILD.bazel b/internal/descriptor/apiconfig/BUILD.bazel
index 80dc57a2..76d4374f 100644
--- a/internal/descriptor/apiconfig/BUILD.bazel
+++ b/internal/descriptor/apiconfig/BUILD.bazel
@@ -11,6 +11,7 @@ proto_library(
],
deps = [
"@go_googleapis//google/api:annotations_proto",
+ "@go_googleapis//google/api:http_proto",
],
)

View File

@@ -0,0 +1,22 @@
diff --git a/protoc-gen-grpc-gateway/internal/gengateway/template.go b/protoc-gen-grpc-gateway/internal/gengateway/template.go
index 6d3476df..6392af9a 100644
--- a/protoc-gen-grpc-gateway/internal/gengateway/template.go
+++ b/protoc-gen-grpc-gateway/internal/gengateway/template.go
@@ -243,8 +243,7 @@ It translates gRPC into RESTful JSON APIs.
package {{.GoPkg.Name}}
import (
github_com_prysmaticlabs_prysm_v4_consensus_types_primitives "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives"
- emptypb "github.com/golang/protobuf/ptypes/empty"
- "github.com/golang/protobuf/ptypes/empty"
+ "google.golang.org/protobuf/types/known/emptypb"
{{range $i := .Imports}}{{if $i | printf "%q" | ne "github.com/golang/protobuf/ptypes/empty"}}{{$i | printf "%s\n"}}{{end}}{{end}}
)
@@ -257,7 +256,6 @@ var _ = utilities.NewDoubleArray
var _ = metadata.Join
var _ = github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Epoch(0)
var _ = emptypb.Empty{}
-var _ = empty.Empty{}
`))
handlerTemplate = template.Must(template.New("handler").Parse(`