by edejong · 9y ago · 0 comments
No, you have to realize you're working on one side of the graph (source code), but your build produces something on the other side (your artifact). Without automatic dependency resolution of you DAG, you're constantly traversing from one side to the other, making the build 'work'.
Alternatives are not replacements.
A build-script without dependency resolution clearly does not scale. It was the reason to design and implement Make, CMake, Maven, SBT and many others.
Some systems don't need to scale. Make and SBT etc. have an impedance mismatch with some projects due to their learning curve and the current sophistication of the development team.
The most important feature of any development tool is not whether it is best practice, it is whether it works. For example, Tarn Adams doesn't use version control for Dwarf Fortress. [1] That doesn't mean Microsoft should have switched the Windows codebase to zip files instead of Git any more than a single developer should start boiling the small lake of SBT just because it is better.
Sometimes, it is easier and faster and better to just build the tool that is needed. And of course sometimes it isn't.
[1]: https://www.reddit.com/r/IAmA/comments/1avszc/im_tarn_adams_...
- Parallel downloading / uploading of artifacts
- Multi-step transformation (old-style: lexer to C to Object file to linker to deployment). You can turn this around, but generally you want each output of your lexer to be input to the C compiler and so on.
- Testing (especially brute-force testing might take time)
And in modern situations you have the same, with Typescript => Javascript => Minimisation => Combination => Deployment (roughly).
It really helps to think of this as a dependency chain and use a partial-order planner to find a possible linearization and execute.