Live data from Hacker News

Bazel – Correct, reproducible, fast builds for everyone

bazel.io

1–10 of 185 posts

Re: Bazel – Correct, reproducible, fast builds for everyone

#3
How 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

#4
Working 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 contributors to build and test.

Re: Bazel – Correct, reproducible, fast builds for everyone

#5
post #3

How 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

#6
post #5
post #3

How 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 ?

... 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

#7
post #4

Working 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?

Re: Bazel – Correct, reproducible, fast builds for everyone

#8
post #6
post #5

Earlier 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.

huge Java projects...why would you compare a general build tool to a language-specific one?

Re: Bazel – Correct, reproducible, fast builds for everyone

#9
post #3

How 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 work on Bazel.

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

#10
post #4

Working 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?

See http://bazel.io/docs/FAQ.html, "Will Bazel make my builds 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."

Post reply on HN