Running local tools installed by Bazel
Blog post from Aspect Build
Developers often face challenges with ensuring that command-line tools are up-to-date and compatible across different machines, particularly when working with tools like Terraform. The article discusses using Bazel to streamline the process of managing these tool versions, although setting it up has traditionally been cumbersome. A recent contribution to a Bazel utility ruleset introduces a JSON-format lockfile to help fetch specific tool binaries across various platforms, simplifying the installation process. Despite some inherent limitations in Bazel, such as issues with the working directory when running commands, the article provides a workaround using a helper script and symlinks to ensure tools run as expected in any directory. This method allows for consistent and reliable tool usage, and although a new feature in rules_multitool aims to address the working directory concern, the described approach remains valuable for those fetching tools differently.