4 ms·
How easy is it to "port" BUILD files between the various open implementations (Bazel, Buck, Pants, Please)? If you have a project someone else wrote with the in
by geofft 6y ago
How easy is it to "port" BUILD files between the various open implementations (Bazel, Buck, Pants, Please)? If you have a project someone else wrote with the intention of using it in e.g. Bazel, can you integrate it into your Please build system, or would you need to treat it as an opaque build process (same as if you were shelling out to ./configure && make)?
As a concrete example, one frustration at $DAYJOB is that building certain Google-released OSS is hard to integrate with our existing build system because Bazel is pretty opinionated about compiler-provided headers, output paths, etc. We're calling Bazel as a subprocess during our build and making various files available to it to make our compiler build visible to it, and then we pack up the results. I'm pretty sure if we somehow adopted Bazel for our entire build this would be much better - would it also be better if we adopted one of those other systems?
(Maybe one way of asking this is, are any of the corporate sponsors of Buck, Pants, or Please building third-party Bazel code from source? Or vice versa?)
A broader question: would it be worth defining a compatible subset of BUILD file syntax and library calls (i.e., not just Starlark but also the rules themselves for common things like building C libraries or JARs)?
Are we in the build-system equivalent of the vendor-specific C / C++ / UNIX implementations, and will a cross-vendor standardization effort emerge one day?
- iab 6y agoFor the first part of your question - it is not 1:1. There is some limited capacity for bazel integration, but massaging is needed (IME) for protos, nvcc rules & so on
- emidln 6y agoI've only seriously worked with bazel, but it seems pants and bazel have at least enough compatibility for twitter to migrate to bazel. They gave a talk[0] at bazelcon this year about the effort. [0] https://opensourcelive.withgoogle.com/events/bazelcon2020/watch?talk=day1-talk2 https://opensourcelive.withgoogle.com/events/bazelcon2020/wa...
- laurentlb 6y agoI used to work on Bazel and Starlark. In the past, I talked with engineers working on other build systems to aim for some compatibility. The was some interest (even Microsoft people were interested to support Starlark rules in their tool), but it didn't work. On the BUILD file level, Buck is using the Starlark. Pants and Please are close enough that some tooling (e.g. buildifier) can be shared. But that's about it.