bazelbuild / buildtools

A bazel BUILD file formatter and editor
Apache License 2.0
994 stars 410 forks source link

Initial open-sourcing of add_dep tool #1269

Open cushon opened 1 month ago

cushon commented 1 month ago

See https://github.com/bazelbuild/bazel/issues/4990

This is a lightly modified fork of the internal tool, with updates to e.g. use bazel instead of blaze, and use the standard flags package, etc. I confirmed that it works on examples like https://github.com/bazelbuild/bazel/issues/4990.

One open question here is test coverage. The internal implementation has a suite of e2e integration tests that can be run manually. They set up a tiny bazel workspace, do a build that produces an add_dep error, and confirm that running the provided command fixes the build. I could look at externalizing those. It would be nicer to have something that could run on CI.