buildifier: decouple runner scripts from binaries (#1398) This change aims at making `buildtools/buildifier` more modular and easier to consume by enabling use of prebuilt binaries without pulling in unnecessary dependencies - while strengthening upstream as the authoritative home for runner script templates. Today, `buildifier/BUILD.bazel` exposes two different sets of rules: - exports for runner script templates (`runner.bash.template`, `runner.bat.template`) as well as `README.md`, - `go` build & `sh` test rules which require external repos (`rules_go`, `rules_shell`) even for consumers who don't need to build the `buildifier` binary. It is worth noticing there are two distinct community efforts on runner scripts, the present/upstream `bazelbuild/buildtools` and the derived `keith/buildifier-prebuilt` (Bazel Central Registry module). These drift apart over time, leading to unsynchronized contents (`factory.bzl`, `runner.bash.template`) and efforts, e.g. on Windows support: - https://github.com/bazelbuild/buildtools/pull/1230 - https://github.com/keith/buildifier-prebuilt/pull/89 (open for a year) Intended benefits of this change: - decoupling: by moving `go_binary` and `sh_test` targets into `buildifier/cmd`, the top-level `buildifier/BUILD.bazel` no longer requires `rules_go` nor `rules_shell`, - flexibility: users can either build binaries from source (via `//buildifier/cmd`) or configure rules to use prebuilt binaries (e.g. via `multitool`) while still consuming the same upstream runner script templates, - backward compatibility: aliases keep `//buildifier:buildifier*` working by delegating to `//buildifier/cmd:buildifier*`.
This repository contains developer tools for working with Google's bazel buildtool.
See instructions in each tool's directory.