-
-
Notifications
You must be signed in to change notification settings - Fork 668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate from go_googleapis to com_google_googleapis #1986
Comments
Is anyone working on this? Looking forward to having a language-agnostic repo to use. |
🤷♂️ It turns out that go_googleapis disagrees with the proto_library defined in com_google_googleapis. |
@ashi009 Yes, those should converge ( Any help on this will be greatly appreciated =) |
ping? not sure what's required to implement this... maybe somebody can jot down thoughts that might help the ambitious contributor. |
I don't believe anyone is working on this at the moment. This should eventually done by either me or someone who maintains I had a conversation with @noahdietz (one of the googleapis maintainers) a couple weeks ago. To summarize what needs to be done:
|
As a prerequisite to implementing raw PKCS #1 support in our fake, we need to update our protos. That's tightly sync'ed with our Go toolchain due to an open issue in rules_go [0], so our Go toolchain is coming along for the ride. Steps I performed: * Manually updated 1.13 -> 1.15 in go.mod * `go get -u cloud.google.com/go`, which resulted in changes to go.mod and go.sum. * `gazelle update-repos -from_file=go.mod -to_macro=go.bzl%go_repositories`, which resulted in changes to go.bzl. * Manually updated a couple of additional `http_archive` calls in WORKSPACE. [0] bazel-contrib/rules_go#1986 Change-Id: I68b3e7455909cd58ea3dd8b0ce4f0524c2954eaa
Hi there. I'm currently trying to upgrade a fairly sizable Bazel monorepo from Go 1.13 to Go 1.16+ and rules_go from 0.24.0 to the latest and run into many issues, including now this one.
Currently we are not using gazelle to generate proto file, only BUILD. We're using rules_proto
I've tried to fix some of this by using rules_proto_grpc Thanks. |
There has been no work planned on our end, and Jay is on sabbatical for a while. If @noahdietz has the bandwidth, I'd be happy to review and contribute in a secondary capacity. Workarounds to use the latest Go / rules_go / gazelle are almost certainly possible, although I'm afraid that I don't really know how to help you. I'd be happy to share the combination of versions that we're using -- we have gRPC-based services using gogo, although we do not get too deep into the ecosystem. For example, we do not use grpc gateway. We are on Go 1.16 and use the go_googleapis provided by go_rules_dependencies. We do not use gazelle to generate our proto rules; we use a macro with a lot of customizations; reviewing it now I see some significant workarounds to accommodate gogo, and there appears to be conflict between gogo and the use of grpc server reflection. I'm happy to share a snippet from our rules, although it should include the caveat that this isn't an official recommendation or anything, I'm not confident that there aren't simpler ways to accomplish it, and I'm not even sure that it's helpful for your scenario. With those caveats, the relevant portions expand to something like this:
|
Hey folks, I totally understand the friction/frustration here. I've brought it to the attention of my team (maintainers of the googleapis repo) again and we will try to prioritize the work at the beginning of the new year. |
Thanks @robfig for the reply. What is the purpose of the |
I'm new to this problem, so feel free to tell me my suggestions are junk. It looks like go_googleapis-deletebuild.patch is getting rid of the declarations for other languages than Go. My hunch is that you are doing that because you don't want the dependencies on the other language rules. It causes bloat. Perhaps the best way to solve that is refactor googleapis. The basic idea would Of course, this causes a slow transition for direct users of googleapis. |
Friendly bump here. We ended up depending on |
I don't think anyone objects to doing the switch over at this point, I think we are only limited by spare cycles. @sergiitk, it sound like you might have some. Can I clear any roadblocks on the way to you taking this task on? |
@achew22 thank you for following up. As much as I would want to help, I have zero spare cycles (or even negative 😄). I just wanted to bump this to show there are customers actively affected by the issue. |
I'm glad to hear that there are users, but I must push back on the notion that there are customers. At this point in time, everyone who maintains Given that you're working on gRPC at Google, presumably in Go, maybe this is a place where we could do a little bit of collaborating. How can I help you to surface this gRPC pain-point that is affecting the ecosystem? I imagine that if the gRPC team itself might be interested in ensuring that using gRPC is a good experience for your customers. What can we do as a team to help in this regard? |
Oh, I guess that should have been @sergiitk. Sorry for not tagging you in the original comment. |
That's the thing, I'm on gRPC Java. I only had to deal with this because of contributing to another, non-Google and non-gRPC project. That said, I'd be happy to raise this issue with gRPC Go team, and the Envoy team. Can't promise anything, but maybe someone will consider volunteering. |
@sergiitk The Client Libraries team (which @vam-google and I work on) maintains the com_google_googleapis WORKSPACE. We are a multi-language team and haven't had support to dive into this Go-specific issue (as much as we want to, as it bothers us as well). We'd like to tackle this, but need to get the proposal in front of the right eyes. I will cc you on some communications (and you can include whomever you'd like to or not) to provide your first-hand account/support, but I'm not sure that gRPC/Envoy teams should be responsible for drumming up support. It is our bag, I don't want you to have to hold it, but we (my team) need to commit to getting this done. |
The solution:
It Works! |
bazel-contrib/bazel-gazelle#1561 and #3595 should fix this issue. Please give them a try |
rules_go
depends on googleapis repository by applying gazelle-generated patch.googleapis
is now Bazel-aware andrules_go
should depend on googleapis directly without overwriting its BUILD.bazel files. Also the repository name used within rules_go should be migrated fromgo_googleapis
tocom_google_googleapis
.This is expected to be done in few phases (with deprecation period, when both
go_googleapis
andcom_google_googleaspis
are available).Without this change there is a circular dependency between
googleapis
andrules_go
(becausegoogleapis
uses rules_go to build go clients).Currently, the build of googleapis produces the following warnings because of this issue:
Using
importmap
should work as a short term solution, but proper migration tocom_google_googleapis
would eliminate these warnings automaticaly.The text was updated successfully, but these errors were encountered: