Bazel is a Google-derived build system with some interesting properties but a steep learning curve. In hopes of getting up that curve, I bought a few books recenly, among them Bazel in Depth: Definitive Reference for Developers and Engineers by Richard Johnson. I thought I might share my reactions in case they are helpful.
tl;dr: don't bother.
The text is meandering and repetitive. Every chapter has at least one multi-page superlative-laden discourse on hermetic builds. The chapter on dependency management spends many pages talking about lockfiles (which Bazel doesn't use).
The text rarely gets into details -- it is definitively not a reference, but more of a verbose treatise on build systems as a general concept.
When it does get into details, they're generally wrong. For example, some of the starlark examples use enddef to end a function definition. That's not a thing. The book mentions the @rule decorator for rule definitions. Nope. Apparently list comprehensions aren't allowed? They are, and are quite common. Apparently while is allowed? No, very much not.
I'm almost certain this was written by AI based on a skimpy outline, and charitably given the most cursory review. The language echoes all of the usual slop tropes---it's not just a book full of slop, it's a work of fictional genius! You will learn:
- What Bazel might be - the answer will surprise you! Because it's wrong!
- That everything comes in lists of three - not one, not two. Four is right out.
-
The
--action_envflag - this revolutionary flag allows passing environment variables into the hermetic build process!













