-
Notifications
You must be signed in to change notification settings - Fork 381
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
bzlmod/go_deps: bazel mod tidy adds repos that are loaded as bazel modules #1935
Comments
In Bazel 7.4.0 and 8, you will be able to have |
I wonder if for now we can just look at all the |
The Gazelle extension can't do this as it doesn't have access to MODULE files. Having looked into this more, I think that it's actually a feature (but not with a good error message): You have the same dep show up under two different names in your dep tree, which can result in linker errors. Instead, when Bazel 7.4.0 lands, you should use |
I am facing a similar problem, but the project I am working on uses Bazel Is there a way to manually tell Gazelle not to manage a specific dependency in older Bazel versions that don't have |
Could you rename the conflicting dep via the |
This is the solution I ended up going with, but it's not ideal because I am virtually importing the same dependency twice. bazel_dep("grpc_gateway", version = "2.23.0") # removed `, repo_name = "com_github_grpc_ecosystem_grpc_gateway_v2"`
use_repo(
go_deps,
"com_github_grpc_ecosystem_grpc_gateway_v2", # added via go.mod
) |
To reproduce:
MODULE.bazel
go.mod (includes direct dep)
bazel mod tidy
:Build failure caused:
The text was updated successfully, but these errors were encountered: