Document best practice of avoiding extensions directly specifying repository names#18443
Closed
rickeylev wants to merge 2 commits intobazelbuild:masterfrom
Closed
Document best practice of avoiding extensions directly specifying repository names#18443rickeylev wants to merge 2 commits intobazelbuild:masterfrom
rickeylev wants to merge 2 commits intobazelbuild:masterfrom
Conversation
fmeum
approved these changes
May 18, 2023
Collaborator
fmeum
left a comment
There was a problem hiding this comment.
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
approved these changes
Jan 30, 2024
Member
Wyverald
left a comment
There was a problem hiding this comment.
sorry, I somehow completely missed this one. LGTM!
Contributor
|
@bazel-io fork 7.1.0 |
bazel-io
pushed a commit
to bazel-io/bazel
that referenced
this pull request
Feb 12, 2024
…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
Member
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Starting with a GH pr for external feedback. I'll resend as an internal CL once approved.