-
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
incompatible_unambiguous_label_stringification #16196
Labels
breaking-change-6.0
Incompatible flags to be flipped in Bazel 6.0
incompatible-change
Incompatible/breaking change
migration-ready
Incompatible flag is ready for migration with Bazel rolling releases or Bazel@last_green
Comments
Wyverald
added
incompatible-change
Incompatible/breaking change
migration-ready
Incompatible flag is ready for migration with Bazel rolling releases or Bazel@last_green
labels
Aug 31, 2022
Wyverald
added a commit
to bazelbuild/rules_rust
that referenced
this issue
Sep 6, 2022
Currently the list in the said file only works if the rules_rust repo is named exactly "rules_rust". This commit fixes it so that the list contains Label objects which would work regardless of what the repo is called. Also fixes the generation script to allow leading '@'s in the label stringification result (see bazelbuild/bazel#16196).
Wyverald
added a commit
to bazelbuild/rules_rust
that referenced
this issue
Sep 6, 2022
Currently the list in the said file only works if the rules_rust repo is named exactly "rules_rust". This commit fixes it so that the list contains Label objects which would work regardless of what the repo is called. Also fixes the generation script to allow leading '@'s in the label stringification result (see bazelbuild/bazel#16196).
Wyverald
added a commit
to bazelbuild/rules_rust
that referenced
this issue
Sep 6, 2022
Currently the list in the said file only works if the rules_rust repo is named exactly "rules_rust". This commit fixes it so that the list contains Label objects which would work regardless of what the repo is called. Also fixes the generation script to allow leading '@'s in the label stringification result (see bazelbuild/bazel#16196).
Wyverald
added a commit
to bazel-contrib/rules_go
that referenced
this issue
Sep 6, 2022
fmeum
pushed a commit
to bazel-contrib/rules_go
that referenced
this issue
Sep 6, 2022
Wyverald
added
the
breaking-change-6.0
Incompatible flags to be flipped in Bazel 6.0
label
Sep 6, 2022
Wyverald
added a commit
to bazelbuild/rules_scala
that referenced
this issue
Sep 6, 2022
Needed to flip bazelbuild/bazel#16196
illicitonion
pushed a commit
to bazelbuild/rules_rust
that referenced
this issue
Sep 6, 2022
Currently the list in the said file only works if the rules_rust repo is named exactly "rules_rust". This commit fixes it so that the list contains Label objects which would work regardless of what the repo is called. Also fixes the generation script to allow leading '@'s in the label stringification result (see bazelbuild/bazel#16196).
Wyverald
added a commit
to bazelbuild/rules_scala
that referenced
this issue
Sep 7, 2022
Needed to flip bazelbuild/bazel#16196
Wyverald
added a commit
to bazelbuild/rules_scala
that referenced
this issue
Sep 8, 2022
Wyverald
added a commit
to bazelbuild/rules_scala
that referenced
this issue
Sep 9, 2022
Wyverald
added a commit
to bazel-contrib/rules_nodejs
that referenced
this issue
Sep 9, 2022
With bazelbuild/bazel#16196 flipped, labels in the main repo will have an extra '@' prepended when stringified. This breaks stuff like https://github.com/bazelbuild/rules_nodejs/blob/a461224651a2802a53a163bef23d6a3fe2597d4d/internal/runfiles/index.cjs#L72 . This commit fixes the issue by removing leading '@'s in main-repo labels before setting BAZEL_TARGET
12 tasks
copybara-service bot
pushed a commit
to bazelbuild/intellij
that referenced
this issue
Sep 9, 2022
…in-repo labels Both "@//foo:bar" and "//foo:bar" mean the same thing in the main repo, but the latter can be ambiguous in a non-main repo, so Bazel 6.0 is going to flip bazelbuild/bazel#16196 (i.e. produce "@//foo:bar" instead of "//foo:bar" when `str(label)` is called). This means that for certain intellij tests (such as those deriving from IntellijAspectTest) to keep working, we need to strip the leading '@'s from any such labels. PiperOrigin-RevId: 472728591
copybara-service bot
pushed a commit
to bazelbuild/intellij
that referenced
this issue
Sep 9, 2022
…in-repo labels Both "@//foo:bar" and "//foo:bar" mean the same thing in the main repo, but the latter can be ambiguous in a non-main repo, so Bazel 6.0 is going to flip bazelbuild/bazel#16196 (i.e. produce "@//foo:bar" instead of "//foo:bar" when `str(label)` is called). This means that for certain intellij tests (such as those deriving from IntellijAspectTest) to keep working, we need to strip the leading '@'s from any such labels. PiperOrigin-RevId: 472728591
copybara-service bot
pushed a commit
to bazelbuild/intellij
that referenced
this issue
Sep 9, 2022
…in-repo labels Both "@//foo:bar" and "//foo:bar" mean the same thing in the main repo, but the latter can be ambiguous in a non-main repo, so Bazel 6.0 is going to flip bazelbuild/bazel#16196 (i.e. produce "@//foo:bar" instead of "//foo:bar" when `str(label)` is called). This means that for certain intellij tests (such as those deriving from IntellijAspectTest) to keep working, we need to strip the leading '@'s from any such labels. PiperOrigin-RevId: 473258584
Wyverald
pushed a commit
to bazelbuild/intellij
that referenced
this issue
Sep 9, 2022
…in-repo labels Both "@//foo:bar" and "//foo:bar" mean the same thing in the main repo, but the latter can be ambiguous in a non-main repo, so Bazel 6.0 is going to flip bazelbuild/bazel#16196 (i.e. produce "@//foo:bar" instead of "//foo:bar" when `str(label)` is called). This means that for certain intellij tests (such as those deriving from IntellijAspectTest) to keep working, we need to strip the leading '@'s from any such labels. PiperOrigin-RevId: 473258584
Merged
3 tasks
mai93
pushed a commit
to bazelbuild/intellij
that referenced
this issue
Sep 9, 2022
…in-repo labels (#3913) Both "@//foo:bar" and "//foo:bar" mean the same thing in the main repo, but the latter can be ambiguous in a non-main repo, so Bazel 6.0 is going to flip bazelbuild/bazel#16196 (i.e. produce "@//foo:bar" instead of "//foo:bar" when `str(label)` is called). This means that for certain intellij tests (such as those deriving from IntellijAspectTest) to keep working, we need to strip the leading '@'s from any such labels.
Wyverald
added a commit
to bazel-contrib/rules_nodejs
that referenced
this issue
Sep 9, 2022
With bazelbuild/bazel#16196 flipped, labels in the main repo will have an extra '@' prepended when stringified. This breaks stuff like https://github.com/bazelbuild/rules_nodejs/blob/a461224651a2802a53a163bef23d6a3fe2597d4d/internal/runfiles/index.cjs#L72 . This commit fixes the issue by removing leading '@'s in main-repo labels before setting BAZEL_TARGET
cpsauer
pushed a commit
to hedronvision/bazelbuild-intellij
that referenced
this issue
Sep 9, 2022
…in-repo labels (bazelbuild#3913) Both "@//foo:bar" and "//foo:bar" mean the same thing in the main repo, but the latter can be ambiguous in a non-main repo, so Bazel 6.0 is going to flip bazelbuild/bazel#16196 (i.e. produce "@//foo:bar" instead of "//foo:bar" when `str(label)` is called). This means that for certain intellij tests (such as those deriving from IntellijAspectTest) to keep working, we need to strip the leading '@'s from any such labels.
This was referenced Sep 13, 2022
Open
Wyverald
added a commit
to bazelbuild/continuous-integration
that referenced
this issue
Sep 15, 2022
so that we can flip bazelbuild/bazel#16196
fweikert
pushed a commit
to bazelbuild/continuous-integration
that referenced
this issue
Sep 15, 2022
so that we can flip bazelbuild/bazel#16196
aiuto
pushed a commit
to aiuto/bazel
that referenced
this issue
Oct 12, 2022
Fixes bazelbuild#15916 Fixes bazelbuild#16196 PiperOrigin-RevId: 474520825 Change-Id: I38caf7879fb82c72e07ef11a96be20ade5ac5401
ittaiz
pushed a commit
to wix-playground/intellij
that referenced
this issue
Oct 24, 2022
…in-repo labels (bazelbuild#3913) Both "@//foo:bar" and "//foo:bar" mean the same thing in the main repo, but the latter can be ambiguous in a non-main repo, so Bazel 6.0 is going to flip bazelbuild/bazel#16196 (i.e. produce "@//foo:bar" instead of "//foo:bar" when `str(label)` is called). This means that for certain intellij tests (such as those deriving from IntellijAspectTest) to keep working, we need to strip the leading '@'s from any such labels.
12 tasks
@Wyverald Is 7.0 or 8.0 the right time to no-op this? |
Unfortunately this is still used in Google (a monorepo where '@' is never used), so I don't think we could remove/no-op this anytime soon. |
fmeum
pushed a commit
to fmeum/continuous-integration
that referenced
this issue
Dec 10, 2023
so that we can flip bazelbuild/bazel#16196
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
breaking-change-6.0
Incompatible flags to be flipped in Bazel 6.0
incompatible-change
Incompatible/breaking change
migration-ready
Incompatible flag is ready for migration with Bazel rolling releases or Bazel@last_green
To fix #15916, we'll be setting the flag
--incompatible_unambiguous_label_stringification
totrue
in Bazel 6.0. This means that labels in the main repo will have an@
prepended to them when stringified, i.e.str(Label("@//foo:bar"))
will be"@//foo:bar"
, instead of"//foo:bar"
.Note that if
--enable_bzlmod
is specified, then the string will contain an extra@
("@@//foo:bar"
), using the canonical label literal syntax (see https://docs.google.com/document/d/1N81qfCa8oskCk5LqTW-LNthy6EBrDot7bdUsjz6JFC4/edit?usp=sharing).The text was updated successfully, but these errors were encountered: