rules_buf icon indicating copy to clipboard operation
rules_buf copied to clipboard

Toolchain refactoring

Open chancila opened this issue 3 years ago • 5 comments

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.toolchain which contains the ToolchainInfo with the BufToolchainInfo)
  • Due to the above, it's possible to run buf rules in different execution platforms for host (ie if using remote execution)

chancila avatar Aug 15 '22 18:08 chancila

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Aug 15 '22 18:08 CLAassistant

Are there any tests for validating these rules? there seem to not be

chancila avatar Aug 15 '22 18:08 chancila

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.

srikrsna-buf avatar Nov 13 '23 12:11 srikrsna-buf

thanks, signed

chancila avatar Nov 14 '23 02:11 chancila