Canonicalize use_extension label #17920
Closed
fmeum wants to merge 2 commits intobazelbuild:masterfrom
Closed
Conversation
Collaborator
Author
|
Stacked on #17909 |
479d7e9 to
db03c26
Compare
db03c26 to
27e0dd8
Compare
Collaborator
Author
|
@Wyverald I resolved the conflicts. |
Wyverald
approved these changes
Mar 30, 2023
| extensionBzlFile = "@" + ownName + rawExtensionBzlFile; | ||
| } else { | ||
| extensionBzlFile = rawExtensionBzlFile; | ||
| } |
Member
There was a problem hiding this comment.
nit: could we put this part in a separate method? I think that'd help with readability since this part is very self-contained.
Normalize the label by adding the current module's repo_name if the label doesn't specify a repository name. This is necessary as ModuleExtensionUsages are grouped by the string value of this label, but later mapped to their Label representation. If multiple strings map to the same Label, this would result in a crash.
27e0dd8 to
0df7c14
Compare
Member
|
Hi @Wyverald, Since I can see that this PR has been approved, please let me know whether I should proceed with importing it.Thanks! |
Wyverald
pushed a commit
that referenced
this pull request
Apr 21, 2023
Canonicalize the label by adding the current module's repo_name if the label doesn't specify a repository name. This is necessary as ModuleExtensionUsages are grouped by the string value of this label, but later mapped to their Label representation. If multiple strings map to the same Label, this would result in a crash. Also enforce that `module()` is called first (if at all). Closes #17920. PiperOrigin-RevId: 520890201 Change-Id: Ice8e2feb0da591e3ba953f4a85284766ba599ebf
fweikert
pushed a commit
to fweikert/bazel
that referenced
this pull request
May 25, 2023
Canonicalize the label by adding the current module's repo_name if the label doesn't specify a repository name. This is necessary as ModuleExtensionUsages are grouped by the string value of this label, but later mapped to their Label representation. If multiple strings map to the same Label, this would result in a crash. Also enforce that `module()` is called first (if at all). Closes bazelbuild#17920. PiperOrigin-RevId: 520890201 Change-Id: Ice8e2feb0da591e3ba953f4a85284766ba599ebf
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.
Canonicalize the label by adding the current module's repo_name if the
label doesn't specify a repository name. This is necessary as
ModuleExtensionUsages are grouped by the string value of this label, but
later mapped to their Label representation. If multiple strings map to
the same Label, this would result in a crash.
Also enforce that
module()is called first (if at all).