rules_buf
rules_buf copied to clipboard
Toolchain refactoring
This is kind of a big change. Key takeaways:
- Use a single toolchain type, having 3 for 3 different tools is unnecessary, especially since everything is downloaded together
- Expose the toolchain using a provider (
BufToolchainInfo), this is how toolchains typically are used - Refactor toolchain download to prepare toolchains for all execution platforms, due to how toolchain lazy loading works the actual toolchain files are not fetched until it's needed, registering a toolchain does not cause all of it's attributes to be evaluated (namely
toolchain.toolchainwhich contains the ToolchainInfo with theBufToolchainInfo) - Due to the above, it's possible to run buf rules in different execution platforms for host (ie if using remote execution)
Are there any tests for validating these rules? there seem to not be
Hey @chancila! If you can sign the CLA, I'll take up https://github.com/bufbuild/rules_buf/pull/26#discussion_r949296569 and resolve the merge conflicts to get this merged.
thanks, signed