You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Removes all the `Label` wrappers added in bazel-contrib#1696 that aren't strictly
necessary.
Removed instances:
```sh
$ git show -p | grep '^- .*Label(' | wc -l
88
```
Remaining instances:
```sh
$ git ls-files | xargs grep '[^A-Za-z0-9]Label(' | wc -l
31
```
Inspired by research I did while writing a blog post reflecting upon the
motivations behind bazel-contrib#1696.
Bazel evaluates target string literals in the context of the repository
that appears to contain the assignment of the literal to a `Label`
attribute. `Label` wrappers are necessary for target string literals
within macros, passed to external functions, and included in files
generated by a repository rule. This ensures that the targets refer to
the originating repository by preventing Bazel from interpreting them
within the context of the repository using them.
Keeping the `Label` wrappers doesn't hurt, but leaving only the ones
that are required helps those instances stand out.
0 commit comments