6 ms·
https://bazel.build/ https://bazel.build/ supports this. Bazel is Google’s build system, open-sourced.
by secure 10y ago
https://bazel.build/ https://bazel.build/ supports this. Bazel is Google’s build system, open-sourced.
- kibwen 10y agoFrom reading https://bazel.build/versions/master/docs/test-encyclopedia.html https://bazel.build/versions/master/docs/test-encyclopedia.h... , it looks like Bazel's rules are quite strict (not to mention Unix-specific), and requires writing a separate rules file to configure test behavior (e.g. an "external" tag to denote tests that cannot be cached). I anticipate that it would be difficult to retrofit such things onto Go's existing ecosystem in-place (or any language's, for that matter), especially without sacrificing Go's minimalist philosophy (i.e. "this function is a test if its identifier begins with `Test`, end of story"), especially considering Go's documented aversion to config files WRT package management. As an optional external tool it may work quite nicely, however.
- zaphar 10y agoBazel's rules are extremely strict. For what it's worth when I was at Google all the Go code was built with Bazel. Most of the google engineers don't experience this pain internally I imagine.
- paulddraper 10y agoI'm not sure that operates at the same granularity though.