Live data from Hacker News

Bazel – Correct, reproducible, fast builds for everyone

bazel.io

91–100 of 185 posts

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

#91
post #17

Correct, reproducible, fast builds for everyone not running Windows

Convince your employer to ship a half decent unix environment with its OS and it will run on windows too. It's mostly a choice by microsoft to ship a half-baked command line interface with its products, you can't blame google for that.

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

#93
post #41
post #16

Earlier quoted context omitted.

Bazel uses checksums to determine if builds are up-to-date, but shortcuts the checksumming if metadata (timestamp, filesize) have not changed between builds.

Your FAQ says this: Bazel configuration files are much more structured than Gradle's, letting Bazel understand exactly what each action does. This allows for more parallelism and better reproducibility. Could you please elaborate on that (i.e. with regards to both parallelism and reproducibility)?

I'm not a Gradle expert, so take this with a grain of salt.

Gradle a single-threaded execution in some parts (I believe it may be configuration?), because the build-rules are written in a full blown language with access to the filesystem, and internal parts of Gradle.

In Bazel, rules have to declare inputs and outputs, and this can be enforced with sandboxing. This allows to predict that two rules do not interfere with each other, so we know we can run them in parallel. Our extension language disallows direct access to the file system, and also forbids access to other sources of non-determinism, such as hash tables and the clock.

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

#94
post #88

Maven doesn't work so well when there are loads of small self contained 'micro-libraries' (yes, sub-projects, but they are so involved to set up they almost defeat the purpose). Was considering pants -- which doesnt seem like it has great adoption? -- but this seems like its substantially more fully featured. Presumably will also make opensourcing internal projects easier. That can't be a bad thing :)

WRT to Java support: Since it doesn't appear to generate poms or publish to maven repositories it doesn't seem very useful on the open source part of things. It seems explicitly for generating internal, proprietary software from a monolithic source tree. I would have much rather seen the incremental compiler and jar generator integrated to maven than replacing the entire build system.

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

#95
post #67
post #38

Earlier quoted context omitted.

The Golang source code for the server code at google is built with this tool. The rules that accomplish this are rather complex due to their interactions with our C++ libraries, and predates the open source "Go" tool. The experience with the Google internal rules, motivated some of the choices in the "go" tool, I believe. If you're interested, hanwen wrote a bunch rules with similar semantics as the internal rules, s…

In what cases would using Bazel make sense to build Go projects? If they're extremely large? If they have a lot of dependencies on code in other languages? If you need sophisticated build/release tooling? BTW, thanks for the release! Will have a fun time digging through this over the next few days. I heard some murmurs that Blaze was going to be open sourced from around the watercooler but didn't think it'd be so soo…

I guess if you want to integrate Go tools with builds in other languages. If you are using pure Go for your entire ecosystem, there is not much point in using Bazel, as the "go" tool is very capable for that scenario.

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

#96
post #75
post #62

Earlier quoted context omitted.

Do you have a link to that white paper? A quick search on their research site doesn't really yield any results.

I'm a developer on Bazel, and AFAIK there is no white paper. We definitely don't want to "throw it over the wall," we're going to try to push more and more development into the open over time.

There's not a white paper, but there's this series of posts: http://google-engtools.blogspot.com/2011/06/build-in-cloud-a...

(and an accompanying presentation)

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

#97
post #54
post #35

I had a bit of a read but I didn't find where it explains (code or doc) how it achieves reproducible builds. It seems like a stricter, huge make-like harness (in fact it reminds me of the mozilla firefox python build system a bit). It's not bad by any means, but it seems like to me it doesn't "magically" fix the "be reproducible" problem at all (which is what it seem to claim) Am I missing something?

You are absolutely correct: Bazel by itself does not make your builds reproducible. If a tool calls rand() or bakes the current time into its output, reproducibility goes out of the window. What Bazel does, however, is to make it possible to run build steps in a sandbox (although the current one is kinda leaky) so that your build is isolated from the environment and thus behaves in the same way on any computer. It al…

Does work done by Debian to make Linux packages build reproducibly help Bazel?

https://wiki.debian.org/ReproducibleBuilds

Would Bazel help with the remaining long tail of packages in Debian?

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

#98

Surprisingly, significant parts of the code is not open source. According to this page, http://bazel.io/docs/governance.html , Is Bazel developed fully in the open? Unfortunately not. We have a significant amount of code that is not open source; in terms of rules, only ~10% of the rules are open source at this point. We did an experiment where we marked all changes that crossed the internal and external code bases ov…

Do they mean that 10% of the original Blaze rules are now open source or that 10% of the Bazel rules they've released are open source?

The former.

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

#99
post #93
post #41

Earlier quoted context omitted.

Your FAQ says this: Bazel configuration files are much more structured than Gradle's, letting Bazel understand exactly what each action does. This allows for more parallelism and better reproducibility. Could you please elaborate on that (i.e. with regards to both parallelism and reproducibility)?

I'm not a Gradle expert, so take this with a grain of salt. Gradle a single-threaded execution in some parts (I believe it may be configuration?), because the build-rules are written in a full blown language with access to the filesystem, and internal parts of Gradle. In Bazel, rules have to declare inputs and outputs, and this can be enforced with sandboxing. This allows to predict that two rules do not interfere wi…

Ah, OK. BTW, while Gradle doesn't enforce it, even tasks that directly touch the filesystem may (and should) declare their inputs (that can be files or other tasks) and outputs[1] so that their freshness can be evaluated. All default tasks (like compilation), do that out of the box.

[1]: 15.9 in https://www.gradle.org/docs/current/userguide/more_about_tas...

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

#100
post #27

Earlier quoted context omitted.

I didn't downvote him but it sounds like "he's driving angry". He does work for that "evil" company in Redmond. :-). Maybe he can help make F# a great cross-platform language and increase the goodwill? Microsoft did an incredible job with F# but it really only runs well on Windows.

What particular problems on non-Windows do you have with F#? I've been running F# applications in telecom, in production, on Mono, for several years. F# doesn't really seem to be the factor there at all, it's just general .NET support. In fact, F# can do a bit better than C#, as F# actually includes a static linker.

Strange, most blogs that I've read discuss the pain involved.

http://spin.atomicobject.com/2014/06/06/f-sharp-mono-unix/

I guess it's the same with any new product or language: when there are a lot more great testimonials than cries of pain, then it's actually safe to use that product.

Post reply on HN