buildtools icon indicating copy to clipboard operation
buildtools copied to clipboard

buildozer: Provide a way to manipulate "load" aliases

Open nacl opened this issue 6 years ago • 0 comments

Bazel's load builtin supports a syntax for aliasing loaded values, something like this:

load("//:pkg.bzl", some_alias = "some_value")

Which causes some_alias to refer to some_value in the file in which it is used.

There does not seem to be a mechanism for manipulating them within buildozer, or it is not clearly documented. Judging by looking at the tests for replace_load, which mention replacing the values with non-aliases, it looks to be not supported.

However, it does look like buildozer has knowledge of them, as it is able to replace them with non-aliases and keep them intact as needed. It would be nice if there would be a way to create or change them using buildozer.

nacl avatar Apr 14 '20 17:04 nacl