Closed alexbozhenko closed 4 weeks ago
Thanks @sluongng for the suggestion, I was able to patch it like this:
http_archive(
name = "rules_proto_grpc",
sha256 = "f87d885ebfd6a1bdf02b4c4ba5bf6fb333f90d54561e4d520a8413c8d1fb7beb",
strip_prefix = "rules_proto_grpc-4.5.0",
patch_args = ["-p1"],
patches = ["//buildpatches:gateway_grpc_library.bzl.patch",],
urls = [
"https://github.com/rules-proto-grpc/rules_proto_grpc/archive/refs/tags/4.5.0.tar.gz",
],
)
$ cat buildpatches/gateway_grpc_library.bzl.patch
diff --git a/grpc-gateway/gateway_grpc_library.bzl b/grpc-gateway/gateway_grpc_library.bzl
index 91cedbfe..0b3fbae1 100644
--- a/grpc-gateway/gateway_grpc_library.bzl
+++ b/grpc-gateway/gateway_grpc_library.bzl
@@ -38,5 +38,5 @@ GATEWAY_DEPS = [
"@org_golang_google_grpc//metadata:go_default_library",
"@com_github_grpc_ecosystem_grpc_gateway_v2//runtime:go_default_library",
"@com_github_grpc_ecosystem_grpc_gateway_v2//utilities:go_default_library",
- "@go_googleapis//google/api:annotations_go_proto",
+ "@org_golang_google_genproto_googleapis_api//annotations",
]
@aaliddell looks like you have been active in the repo recently. Can we commit this fix?
This should be fixed in 5.0.0. Please let me know if not
Issue Description
The rules_go 0.41.0 and gazelle 0.32.0 added the breaking go_googleapis change.
This repo uses go_googleapis in multiple places. E.g.: gateway_grpc_library
I am trying to update my repo to use go 1.21. That requires the latest version or gazelle and rules_go. When I am trying to use gateway_grpc_library in a repo that has the latest version, I get the following error, even though go_googleapis is not defined/used anywhere in my repo.
I know this is not a proper bug report, and I will need to provide a reproducer, but I wanted to check and see if updating the version of
rules_go
andgazelle
can breakgateway_grpc_library
, or is it something else in my repo setup that is more likely to be broken? UPD: I tried to update versions here: https://github.com/rules-proto-grpc/rules_proto_grpc/pull/277I did try to include https://github.com/googleapis/googleapis repo and
gazelle:resolve
stanzas as per the advice in the release notes for rules_go, but still that did not work.So I am wondering if the fix that fix is also needed to repositories.bzl in this repo, if it were to be used with the latest
rules_go
?Log Output
rules_proto_grpc Version
4.4.0
Bazel Version
6.3.2
OS
Ubuntu 22.04
Link to Demo Repo
No response
WORKSPACE Content
No response
BUILD Content
No response
Proto Content
No response
Any Other Content
No response