You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prepares for `repository_ctx.original_name` support in Bazel 8.1.0 per
bazelbuild/bazel#24467 and bumps Go to 1.23.6. Part of bazel-contrib#1482 and bazel-contrib#1652.
The underlying repo rules will now use `repository_ctx.original_name` if
it's available.
I've confirmed that these changes use `repository_ctx.original_name`
under Bazel 8.1.0rc2 after commenting out the wrappers and restoring the
original repo rule symbols.
---
This change ensures compatibility with future Bazel releases. New
comments indicate where to simplify code after dropping support for
Bazel versions that don't have `repository_ctx.original_name`.
The Go 1.23.6 bump is a convenience update that isn't essential to the
rest of the change.
Under Bzlmod, `repository_ctx.name` contains the canonical repository
name. This broke the `_alias_repository` and `jvm_import_external`
repository rules, which used `repository_ctx.name` to generate default
top level target names for their repos. bazel-contrib#1650 added wrapper macros
passing the original name as an extra attribute to the underlying repo
rules as a portable workaround.
The Bazel maintainers eventually recognized this as a common use case
and added `repository_ctx.original_name` to eliminate the need for such
wrappers (eventually).
- https://bazel.build/rules/lib/builtins/repository_ctx#name
- https://bazel.build/rules/lib/builtins/repository_ctx#original_name
0 commit comments