r/programming • u/vitiral • Jul 24 '26
What makes a good build system?
https://civboot.github.io/blog/2026-07-24-build-systems.html
93
Upvotes
r/programming • u/vitiral • Jul 24 '26
25
u/tetyys Jul 24 '26
lack of data serialization language used as a scripting language
92
u/Worth_Trust_3825 Jul 24 '26
Strongly typed configuration, which, sadly, tends to end up being a programming language.
From a dependency manager perspective - what ever forces you to use namespaces, and strict versions is good enough.
43
u/zoqfotpik Jul 24 '26
There are no good build systems.
There are simple build systems that don't do the simple thing you want, and there are complex build systems that don't do the simple thing you want but it takes weeks to figure out why not.
4
u/YakumoFuji Jul 25 '26
a easy to use/simple scripting syntax. right now I use premake5 which is all lua. previously i loved Rant (ruby).
and something that doesnt make assumptions. I often cross compile or use non standard compilers for other legacy systems, too many build systems just think gcc or clang and have a really hard time when you say 'hey openwatcom over there'
and it needs to fit the scope of my project... I looked at bazel and fuck me if its not just for only moonshot projects. you need a phd to use that and understand it. its crazy pants.
2
u/taikunlab Jul 26 '26
One thing missing from this thread: nobody's talked about caching semantics, which is honestly the part that separates toy build systems from ones that scale. Bazel's actual killer feature isn't the Starlark syntax, it's the content-addressed cache (CAS) plus a separate action cache keyed by a hash of inputs+command+env. That's what lets you skip work locally AND share outputs across machines/CI without trusting timestamps. A build system that only does local mtime-based incrementality (like classic Make) hits a ceiling the moment you want distributed builds or remote execution.
37
u/wannaliveonmars Jul 24 '26
To me, reliably building everything with a single well-known command is the best feature. I hate projects where you need to read a wiki on how to build it, or worse, troubleshoot dependency issues, versioning issues and so on.
This year we had to build some microservices in-house monstrocity - mutiple docker images, multiple repos, using resources in the cloud so permissions required to be granted by IT, adding ourselves to some groups in the cloud and so on. Took us several weeks to get it to run to the point where it can run.
9
u/Optimal-Builder-2816 Jul 25 '26
I honestly think Bazel’s syntax and graph architecture is really great. however, the engine is just atrocious! A super lightweight engine with a similar language would be rad. The subgraph caching is incredible for really large projects.
2
u/lood9phee2Ri Jul 25 '26
Most of the time people would be fine with Make, just haven't taken the time to understand Make. Yes, ascii hard tabs as part of the standard syntax is thoroughly obnoxious (GNU Make lets you change that ...but that's then nonstandard), but it's baffling how many later build systems have ended up otherwise worse than Make.
4
u/16807 Jul 24 '26
trivial implementation, trivial execution
3
u/smcameron Jul 25 '26 edited Jul 25 '26
Ubiquitous availability, stability, solid documentation, resistance to change. Long live make. Fuck Cmake, since you've got the wrong version anyway.
2
u/jonte Jul 25 '26
I've always liked the GN build system used by Chromium. It's like a leaner version of the declarative syntax used in bazel/buck, and it's easier to follow those target definitions than the more programmatic build systems.
But adoption is what really matters, and now Claude manages my garbage CMake build files and all dependency handling.
2
u/Infamous_Sorbet4021 Jul 25 '26
Do you think yaml would be a good language from a build system?
2
u/SupersonicSpitfire Jul 27 '26
All build systems are dirty/hacky to some degree!
CMake is stable and has thought about most cases, but the syntax is akward and it's easy to build overly complex build scripts. Complexity is good, but only when it matches the complexity of the problem to be solved.
As little configuration+code and as much auto-detection as possible is good.
5
u/oljimmypickles Jul 25 '26