bazel-contrib / bazel-contrib/buildtools
buildozer: 'print label' interacts poorly with ellipsis
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 471
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 13
Description
For example, in the buildtools repo:
```
$ bazel-bin/buildozer/buildozer '//edit/...:*' 'print label
//edit/...:go_default_library
//edit/...:go_default_test
```
The output if you try to use ellipsis with the root directory is even weirder:
```
bazel-bin/buildozer/buildozer '...:*' "print label"
//...:go_default_library
//...:tests
//...:go_default_library
//...:go_default_library
//...:generatetables
//...:copy_and_fix
//...:go_default_library
//...:go_default_library
//...:go_default_test
//...:go_default_library
//...:go_default_library
//...:buildozer
//...:go_default_library
//...:go_default_test
//...:go_default_library
//...:copy_and_fix
//...:go_default_library
//...:copy_and_fix
//...:go_default_library
//...:go_default_library
//...:unused_deps
//...:generateTablesFile
//...:go_default_library
//...:go_default_library
//...:go_default_test
//...:buildifier
//...:go_default_library
//...:go_default_test
```
It looks like there is no code to adjust the output label to account for the actual path in use. We just preserve the ellipsis bit in the input label.
(By the way, this doesn't seem to be caused by fe4721cc0c3a73b2609a3285316e06906e8b4b8e. If you rename BUILD.bazel files to BUILD and check out eaf5ad1d131ea7adf07b958289aea8f80c5ff62b (the preceding commit), this issue still repros.)
Contributor guide
Assessment
This issue has not been assessed yet.