mgaunard
a month ago
My experience is that anything involving Bazel is slow, bloated, and complicated, hammers your disk, copies your files ten times over, and balloons your disk usage without ever collecting the garbage. A lot of essential features are missing so you realistically have to build a lot of custom rules if not outright additional tooling on top.
I'm not too surprised that out of the box docker images exhibit more of this. While it's good they're fixing it, it feels like maybe some of the core concepts cause pretty systematic issues anytime you try to do anything beyond the basic feature set...
gugagore
a month ago
For some more depth into the "bloat" of bazel, I like this reference: https://fzakaria.com/2024/02/27/hermetic-but-at-what-cost
rienbdj
a month ago
Curious if this bloat is present in a Build Without Bytes scenario?
ttiurani
a month ago
Seconded. I tried hard to use Bazel in a polyglot repo because I really wanted just one builder.
Unfortunately, the amount of work you need to just maintain the build across language and bazel version upgrades is incredibly high. Let alone adding new build steps, or going even slightly off the well-trodded path.
I feel like Bazel would need at least 5 more full-time engineers to eventually turn it into an actually usable build tool outside Big Tech. Right now many critical open source Bazel rules get a random PR every now and then from people who don't actually (have time to) care about the open source community.
My go-to now is to use mise + just to glue together build artifacts from every language's standard build tools. It's not great but at least I get to spend time on programming instead of fixing the build.
manmal
a month ago
Is the reason that it works for big tech that those can spare dozens of engineers to make it work?
yupsurprise
a month ago
Yes, each of the big techs has teams that just work on the build systems, however it should also be noted that none of the big tech use the open source Bazel, Google uses Blaze internally which is what Bazel is derived from, Amazon uses Brazil which has nothing to do with Bazel and Meta uses Buck, which I know nothing of so I won't comment on it.
The major issue I found when trying to use Bazel was that its essentially a build system without specific rules for each language, hence rules support for each specific language is dependant on each language's specific community, most of which are quite tiny, and mostly maintained by upstreaming changes from their individual companies, servicing their own needs, hence a lot of work is required to make it work for your own company's needs.
mgaunard
a month ago
Big Tech are large organizations with different needs than that of small organizations.
They care about setting standards over widely different teams and managing large-scale upgrades etc.
It's not optimized for velocity or cost efficiency, which is what a smaller organization needs.
manmal
a month ago
But it doesn’t sound standardized at all if so much customization work is needed.
paulddraper
a month ago
To be clear, when you say “they’re fixing this”…the Bazel maintainers have nothing to do with this.
Bazel is a general purpose tool like Make. But with caching and sandboxing and different syntax.
Make is no less focused on Docker than Bazel is.
Unlike Make however, Bazel does make it easy to share rule sets.
But you don’t need to use other people’s Bazel rule sets any more than you need to use other people’s Make recipes.
This author has a clever way to minimize needing to touch layers at all.
liuliu
a month ago
rules_oci (and bunch of rules_* under bazelbuild / bazel-contrib org on GitHub) is Bazel recommeded rule sets.
I don't agree with your parent comment about Bazel, but your comment is not fair too. Bazel tries to be better build tool so it took on responsibility on registry / rules_* and get critics for it is a fair game.
The "bloated Bazel" blame is not fair too, but I think somewhat understandable. If you ever going to only do JavaScript, bun or other package manager is enough and "lighter-weight". Same goes to uv + Python bundle. Bazel only shines if you are dealing with your C++ mess and even there, people prefer CMake for reasons beyond me.
rienbdj
a month ago
What can used instead for a large multilanguage repo where we want to build every commit?
Genuine question - also find Bazel frustrating at times.
jakewins
a month ago
I tried Basel, Buck2 and Pants for a greenfield mono repo recently, Rust and Python heavy.
Of the three, I went with Buck2. Maybe just circumstance with Rust support being good and not built to replace Cargo?
Bazel was a huge pain - broke all standard tooling by taking over Cargos job, then unable to actually build most packages without massive multi-day patching efforts.
Pants seemed premature - front page examples from the docs didn’t work, apparently due to breaking changes in minor versions, and the Rust support is very very early days.
Buck2 worked out of the box exactly as claimed, leaves Cargo intact so all the tooling works.. I’m hopeful.
Previously I’ve used Make for polyglot monorepos.. but it requires an enormous amount of discipline from the team, so I’m very keen for a replacement with less foot guns
mgaunard
a month ago
Personally, I write my own build systems.
Any readily available build system is more of a meta-language onto which you code your own logic, but with limited control and capabilities. Might as well take control of the whole stack in a real programming language.
Building my own build system lets me optimize my workflow end-to-end, from modular version management, packaging and releasing, building and testing, tightly integrating whatever tool or reporting I want, all seamlessly under the same umbrella.
I mostly do C++, Assembly, eBPF, Python (including C++ Python modules), and multi-stage codegen on Linux, so I haven't really looked at the complexity of other languages or platforms.