Open Zemnmez opened 7 months ago
What commands do you run?
Do you have mixed BUILD
and BUILD.bazel
files?
I looked around and could not reproduce it with only BUILD.bazel
files,
but if I create a BUILD
in the root and a nested BUILD.bazel
it fails.
$ ls
$ touch BUILD.bazel
$ buildozer 'new cc_library foobar' //:__pkg__
fixed .../task/buildozer/build-files/BUILD.bazel
$ buildozer 'add srcs foobar.c' //:foobar
fixed .../task/buildozer/build-files/BUILD.bazel
$ buildozer -f <(echo 'new cc_library bar|//:__pkg__')
fixed .../task/buildozer/build-files/BUILD.bazel
$ cat BUILD.bazel
cc_library(
name = "foobar",
srcs = ["foobar.c"],
)
cc_library(name = "bar")
Now create a root BUILD
and a nested BUILD.bazel
$ mkdir nested
$ touch BUILD.bazel
$ mv BUILD.bazel BUILD
$ buildozer 'new py_library nested' //nested:__pkg__
.../task/buildozer/build-files/nested/BUILD: file not found or not readable
my repo uses "BUILD.bazel" instead of "BUILD", which I believe is the current standard. however, buildozer doesn't support this :(