-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Document best practice of avoiding extensions directly specifying repository names #18443
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
Conversation
fmeum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This explains the point pretty well.
Two aspects you could (but don't have to) cover:
- Root modules may not remain root modules forever, so it may make sense to prefer toolchain resolution to explicit toolchain repo references even for them.
- A module extension could postprocess the
nameattribute per module, so just having two tags with identical names in different modules doesn't guarantee a collision. However, distinguishing between the two would require caller-dependent macros (e.g. usingnative.module_name), which is pretty complex and best avoided (although something as complex asrules_nixpkgswill probably need it).
Wyverald
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, I somehow completely missed this one. LGTM!
|
@bazel-io fork 7.1.0 |
…ository names Starting with a GH pr for external feedback. I'll resend as an internal CL once approved. Closes bazelbuild#18443. PiperOrigin-RevId: 602844306 Change-Id: I5ab6aac6816c40caa77d028a19956d4f2af79d83
…ying repository names (#21300) Starting with a GH pr for external feedback. I'll resend as an internal CL once approved. Closes #18443. Commit 9f5d39e PiperOrigin-RevId: 602844306 Change-Id: I5ab6aac6816c40caa77d028a19956d4f2af79d83 Co-authored-by: Richard Levasseur <[email protected]>
|
The changes in this PR have been included in Bazel 7.1.0 RC1. Please test out the release candidate and report any issues as soon as possible. If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=last_rc. |
Starting with a GH pr for external feedback. I'll resend as an internal CL once approved.