keith / buildifier-prebuilt

A bazel toolchain for using prebuilt binaries for buildifier and buildozer
MIT License
35 stars 13 forks source link

Add option to specify the version for buildifier/buildozer and optional sha256 dict. #5

Closed cgrindel closed 2 years ago

cgrindel commented 2 years ago

First, thanks for putting this repository together. I want to remove the requirement to build buildifier for repositories that use bzlformat. Your solution looks great. However, I wonder if you would be open to a PR that allows the client for this repository to specify the version and, optionally, the sha256 values? If so, I will put one together and send it over for review.

keith commented 2 years ago

Sounds good, I guess making this:

https://github.com/keith/buildifier-prebuilt/blob/cadf94d7b96758a39be64057c6261f3ae1ff4ad4/defs.bzl#L51

take an arg instead of using the constant should work? maybe it's not ideal to make that format a public implementation detail, but at least it should fail fast

cgrindel commented 2 years ago

That's what I am thinking. I'll put a PR together and see what you think.