bazel-contrib / bazel-lib

Common useful functions for writing BUILD files and Starlark macros/rules
Apache License 2.0
137 stars 88 forks source link

[FR]: Allow diff_test to specify diff toolchain #529

Open malt3 opened 1 year ago

malt3 commented 1 year ago

What is the current behavior?

Currently, rules like diff_test (and rules that use it, including write_source_files) expect diff to be in the PATH. This fails on NixOS (and platforms where diff is not preinstalled).

Describe the feature

Provide a method to specify the diff binary (via toolchain or label).

thesayyn commented 5 months ago

FWIW, https://uutils.github.io/diffutils/ has an hermetic diffutils binaries, something similar could be done for diff too.