-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Canonicalize use_extension label #17920
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
|
Stacked on #17909 |
479d7e9 to
db03c26
Compare
db03c26 to
27e0dd8
Compare
|
@Wyverald I resolved the conflicts. |
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.
very nice!
| extensionBzlFile = "@" + ownName + rawExtensionBzlFile; | ||
| } else { | ||
| extensionBzlFile = rawExtensionBzlFile; | ||
| } |
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.
nit: could we put this part in a separate method? I think that'd help with readability since this part is very self-contained.
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.
Done
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
|
Hi @Wyverald, Since I can see that this PR has been approved, please let me know whether I should proceed with importing it.Thanks! |
meteorcloudy
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.
Thanks!!
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
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
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).