Skip to content
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

[Bug]: grpc 1.62.1 imports googleapis as bzlmod, but also does http_archive on it. #1836

Open
malkia opened this issue Apr 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@malkia
Copy link
Contributor

malkia commented Apr 16, 2024

What happened?

I've got this to happen on my project, using the latest gRPC (1.62.1). I've noticed that some library was linked twice. Normally this would work, but this .dll links with /WHOLEARCHIVE, treating every .o (.obj) file from the .a (.lib) file as if it was linked on .o file level.

And I've noticed that somehow googleapis gets linked twice - once from the bzlmod, the other from the http_archive coming of grpc. That surprise me, as https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/grpc/1.62.1/patches/add_module_bazel.patch#L31 specifically does not mention it during the use_repo - but still it gets in https://github.com/grpc/grpc/blob/master/bazel/grpc_deps.bzl#L394 and it's not in the diff here - e.g. https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/grpc/1.62.1/patches/adopt_bzlmod.patch#L508 (you can see that it's still present)

I've made an additional patch for my project soft fork - https://github.com/malkia/opentelemetry-cpp/blob/main/bazel/grpc_deps_remove_googleapis.patch -> gets referenced here https://github.com/malkia/opentelemetry-cpp/blob/main/MODULE.bazel#L22

But maybe a new 1.62.1.bcr.1 (?) version might be good to have with it.

cc: @keith (and Big thanks for working on that!!!)

Version

Development (host) and target OS/architectures:
Windows

Output of bazel --version:
7.1.1

Version of relevant rules from the WORKSPACE or MODULE.bazel file:
It's in the link above

Language(s) and/or frameworks involved:
C++

How to reproduce

Hard to tell, but probably not needed, but I can add these steps to show it.

Any other information?

No response

@malkia malkia added the bug Something isn't working label Apr 16, 2024
@keith
Copy link
Member

keith commented Apr 16, 2024

++ we should add a new release that only has the 1. originally the problem was since these have a circular dependency they had to be added before they could use each other directly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants