-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Cover missing cases during module extension label normalization #20482
Conversation
@@ -486,11 +490,23 @@ private String normalizeLabelString(String rawExtensionBzlFile) { | |||
// same Label, this would result in a crash. |
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.
please update this 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.
Updated @iancha1992
(please merge once the comment above is addressed) |
The previous logic missed to normalize cases such as `"extension.bzl"` and `"//extension.bzl"`, thus resulting in crashes if these styles are mixed as well as invalid buildozer commands for `use_repo` fixing. Instead of enumerating cases, parse the label and emit it in unambiguous canonical form with a leading `@` stripped.
3901c66
to
fa98b07
Compare
@bazel-io flag |
@bazel-io fork 7.1.0 |
The previous logic missed to normalize cases such as `"extension.bzl"` and `"//extension.bzl"`, thus resulting in crashes if these styles are mixed as well as invalid buildozer commands for `use_repo` fixing. Instead of enumerating cases, parse the label and emit it in unambiguous canonical form with a leading `@` stripped. Closes bazelbuild#20482. PiperOrigin-RevId: 592666970 Change-Id: Ieea34b27a187545a11107a334bbae14fef974ae8
…on (#20630) The previous logic missed to normalize cases such as `"extension.bzl"` and `"//extension.bzl"`, thus resulting in crashes if these styles are mixed as well as invalid buildozer commands for `use_repo` fixing. Instead of enumerating cases, parse the label and emit it in unambiguous canonical form with a leading `@` stripped. Closes #20482. Commit 71787cf PiperOrigin-RevId: 592666970 Change-Id: Ieea34b27a187545a11107a334bbae14fef974ae8 Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im> Co-authored-by: Ian (Hee) Cha <heec@google.com> Co-authored-by: Xùdōng Yáng <wyverald@gmail.com>
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. |
The previous logic missed to normalize cases such as
"extension.bzl"
and"//extension.bzl"
, thus resulting in crashes if these styles are mixed as well as invalid buildozer commands foruse_repo
fixing.Instead of enumerating cases, parse the label and emit it in unambiguous canonical form with a leading
@
stripped.