Open keith opened 2 years ago
My understanding is that select()
in an unconfigured build (e.g. bazel query
) will follow all the branches, downloading too much.
But in a configured build like bazel cquery
or bazel build
you only follow the matching branch, so it's as minimal as using toolchains.
The only reason this repo uses toolchains is to avoid downloading multiple versions of buildifier that you'll never use on your platform. It looks like if you use some indirection with a bazel alias in a
select()
you can avoid this as well. https://github.com/bazelbuild/bazel/commit/903c2720792574321d3e3591ca14a9d287819cb7If someone can confirm this is intentional behavior I can switch to this method instead to remove a lot of boilerplate.