duplicate repos between WORKSPACE and MODULE when using repo_name mapping #21818
Labels
area-Bzlmod
Bzlmod-specific PRs, issues, and feature requests
awaiting-user-response
Awaiting a response from the author
P2
We'll consider working on this in future. (Assignee optional)
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
type: bug
Description of the bug:
When using bzlmod and a
bazel_dep(repo_name)
that dependency does not shadow WORKSPACE repositories of the same name.For example, usually the
protobuf
module is namedcom_google_protobuf
in typical workspace setups. The bzlmod name isprotobuf
but needs to be aliased tocom_google_protobuf
to align with typical naming. When this is done thebazel_dep(repo_name = "com_google_protobuf")
is not shadowing thehttp_archive(name = "com_google_protobuf")
.Which category does this issue belong to?
No response
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
bazel build //...
in https://github.com/jbedard/bzlmod-repo_name-dupeThis shows the
bazel_dep(name = "aspect_bazel_lib", repo_name)
not shadowing the transitiveaspect_bazel_lib
loaded from the WORKSPACErules_js_dependencies()
.Which operating system are you running Bazel on?
No response
What is the output of
bazel info release
?7.1.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?No response
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: