Skip to content

Use apparent repo names when fixing loads#1321

Merged
vladmos merged 2 commits intobazelbuild:mainfrom
fmeum:apparent-names
Jan 10, 2025
Merged

Use apparent repo names when fixing loads#1321
vladmos merged 2 commits intobazelbuild:mainfrom
fmeum:apparent-names

Conversation

@fmeum
Copy link
Contributor

@fmeum fmeum commented Jan 10, 2025

Whether a load for e.g. proto rules should be from @com_google_protobuf, @protobuf or a fully custom name depends on the repo_name on the bazel_dep for the protobuf module in the root module's module file.

This PR scans MODULE.bazel and included *.MODULE.bazel files for bazel_deps and uses the derived mapping for the suggested loads.

Whether a load for e.g. proto rules should be from `@com_google_protobuf`, `@protobuf` or a fully custom name depends on the `repo_name` on the `bazel_dep` for the `protobuf` module in the root module's module file.

This PR scans `MODULE.bazel` and included `*.MODULE.bazel` files for `bazel_dep`s and uses the derived mapping for the suggested loads.
@fmeum
Copy link
Contributor Author

fmeum commented Jan 10, 2025

@vladmos @Wyverald Would be great to get this out into an 8.0.1, otherwise many users will pick up load fixes that don't work for them.

@fmeum
Copy link
Contributor Author

fmeum commented Jan 10, 2025

FYI @comius

@vladmos vladmos merged commit 13fa613 into bazelbuild:main Jan 10, 2025
1 check passed
@fmeum fmeum deleted the apparent-names branch January 28, 2025 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants