4 ms·
You're right, there could be a single tool that everyone agrees to use, and that would make programming much nicer as you would be able to learn one build tool,
by brabel 3y ago
You're right, there could be a single tool that everyone agrees to use, and that would make programming much nicer as you would be able to learn one build tool, and then use whatever language you want with it.
What a build system needs to offer, IMHO as someone who also wrote one, is the following:
* tasks (incl. figuring out the graph of dependencies between them and caching results).
* dependencies. Each language has its own repository so it needs to be pluggable. It also may need to resolve conflicts (e.g. Java can't handle multiple versions of the same lib, which you can get due to transitive deps).
* custom options for each language. Native projects may choose -static or -dynlib, Java projects which bytecode version to target and so on.
* tests, documentation generation, linting etc.
Of course there's more to it, but this is the minimum you need. To accomplish all of these, you'll probably need a real programming language or something very close to it - and that's where the problem lies: which language??
XMake chose Lua, which is a very good choice for this (it's a small language but high level and powerful enough to do everything you may need). But if you're writing Java or JS, do you really want to write builds in Lua? Or just use the language-specific build system? I don't think the answer should be obvious, but reality says we chose the latter.
I would love if one day, something like XMake (basically, a DSL to build stuff that's based on a simple lingua-franca, like Lua) became the standard for all communities, but that's not going to happen unless something changes completely in the industry.
- lillecarl 3y agoNix + Nixpkgs pretty much does all of the above