Bazel – Correct, reproducible, fast builds for everyone
1–10 of 185 posts
Re: Bazel – Correct, reproducible, fast builds for everyone
#2I know it as Blaze, which Bazel is an anagram of. Many files in the source have references to Blaze.
Re: Bazel – Correct, reproducible, fast builds for everyone
#3EDIT: I fully understand that this is a build tool for multiple languages. But its raison d'etre is speed. So I'm asking what techniques does Bazel use to accelerate builds and how do they differ from those used by sjavac, which is also designed to accelerate builds of huge projects?
Re: Bazel – Correct, reproducible, fast builds for everyone
#4I think this could be hugely useful to very large open source projects (like databases or operating systems) that may be intimidating for contributors to build and test.
Re: Bazel – Correct, reproducible, fast builds for everyone
#5How does it compare with Java 9's sjavac ( http://stackoverflow.com/a/26424760/750563 )? EDIT: I fully understand that this is a build tool for multiple languages. But its raison d'etre is speed. So I'm asking what techniques does Bazel use to accelerate builds and how do they differ from those used by sjavac, which is also designed to accelerate builds of huge projects?
Re: Bazel – Correct, reproducible, fast builds for everyone
#6How does it compare with Java 9's sjavac ( http://stackoverflow.com/a/26424760/750563 )? EDIT: I fully understand that this is a build tool for multiple languages. But its raison d'etre is speed. So I'm asking what techniques does Bazel use to accelerate builds and how do they differ from those used by sjavac, which is also designed to accelerate builds of huge projects?
I don't think they're even related, Bazel is a general build tool, sjavac looks like a smarter Java compiler ?
Re: Bazel – Correct, reproducible, fast builds for everyone
#7Working at Google, Blaze is one of the technologies that amazes me most. Any engineer can build any Google product from source on any machine just by invoking a Blaze command. I may not want to build GMail from source (could take a while) but it's awesome to know that I can. I think this could be hugely useful to very large open source projects (like databases or operating systems) that may be intimidating for contri…
Re: Bazel – Correct, reproducible, fast builds for everyone
#8Earlier quoted context omitted.
I don't think they're even related, Bazel is a general build tool, sjavac looks like a smarter Java compiler ?
... that exploits parallelism and caching (and a hot VM) to accelerate build of huge projects, and supports build clusters.
Re: Bazel – Correct, reproducible, fast builds for everyone
#9How does it compare with Java 9's sjavac ( http://stackoverflow.com/a/26424760/750563 )? EDIT: I fully understand that this is a build tool for multiple languages. But its raison d'etre is speed. So I'm asking what techniques does Bazel use to accelerate builds and how do they differ from those used by sjavac, which is also designed to accelerate builds of huge projects?
Bazel also builds other languages, such as C++ and Objective-C.
We do invoke the Java compiler through a wrapper of our own. We think we can make that work as a daemon process to benefit from a hot JVM, but haven't gotten round to that.
Re: Bazel – Correct, reproducible, fast builds for everyone
#10Working at Google, Blaze is one of the technologies that amazes me most. Any engineer can build any Google product from source on any machine just by invoking a Blaze command. I may not want to build GMail from source (could take a while) but it's awesome to know that I can. I think this could be hugely useful to very large open source projects (like databases or operating systems) that may be intimidating for contri…
So the builds are reproducible automatically?
For Java and C++ binaries, yes, assuming you do not change the toolchain. If you have build steps that involve custom recipes (eg. executing binaries through a shell script inside a rule), you will need to take some extra care:
Do not use dependencies that were not declared. Sandboxed execution (–spawn_strategy=sandboxed, only on Linux) can help find undeclared dependencies.
Avoid storing timestamps in generated files. ZIP files and other archives are especially prone to this.
Avoid connecting to the network. Sandboxed execution can help here too.
Avoid processes that use random numbers, in particular, dictionary traversal is randomized in many programming languages."