3 ms·
The build system is a key component. If you are working primarily in one language with one set of consistent tools that work together, then you can likely get b
by aseipp 2y ago
The build system is a key component. If you are working primarily in one language with one set of consistent tools that work together, then you can likely get by with just using whatever tools your language offers. Apparently, people have great success in the JS/TS world with tools like pnpm/turborepo. It's totally fine and common to just put everything in one place with one build tool if that's all you really need.
Even if you only have like, 2 languages, often it is possible to stitch the tools together, if you don't go too far off the trodden path, and you understand the two well.
But that leads to the two most important questions: "Do you need to support multiple languages" (N = 3 or more I'd say) and "Do you need to support incremental caching" (including test results.) Once that happens, it becomes very difficult to properly express dependencies and cache artifacts, and it becomes increasingly difficult to expect every developer to consider all the possible interactions between the tools. That means builds take longer (no big cache), and it's easier to break them (missing dependencies) or make them slow (overly conservative dependencies).
If the answer to both of these questions is "Yes", then you need to take serious looks into solutions like Nix, Bazel, or Buck2 to manage your dependencies accurately and cache the results of your builds incrementally. All of these are, quite frankly, going to be difficult to adopt if you are not familiar with them. All of them can save you an incredible amount of pain and effort, too. It's sort of inherent to the problem space; building software is often more complex than we think -- part of the reason why simple single-language tools have so much appeal! -- and has a wide array of nuanced requirements.
Note that the common wisdom is that Nix/Buck/Bazel are often only needed at very large scale. That's true in the sense they are nearly mandatory, but there's a flip side, which is that it's often easiest to adopt those tools early on at a small scale, when there is the least amount of technical debt and smallest amount of impedance mismatch, and you can sort out those problems proactively. It's much easier than solving them all after the fact.
All of these tools will require some amount of dedicated engineering to keep them well maintained and oiled with all the modern conveniences (LSP support, packaging end-result artifacts, etc.)
- baq 2y agomy org has a pnpm and nx combo for the backend. it works. ...but I've no idea how. i don't dare step off the beaten path. when it stops working, i call for help, loudly.
- aseipp 2y agoInteresting. But yeah, even with a very small number of tools, what ends up happening when you just kitbash them together is that the only way to truly understand the dependency graph and build requirements is "Be the person who wrote it in the first place" so this kind of thing where anyone stepping outside the box causes the card house to fall over, is... really common. I have feelings about this situation, but it is what it is. I also take more of my experiences here from the open-source world, where "The build broke for me, what happened?" is often met with a response somewhere between "Works for me" to "You're on your own" or "Just rebuild everything." So, if you at least have someone dedicated who can help you when things go wrong, you're already ahead of the game!