Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

IME you really need a programming language to describe a build, even when it is desired that the result looks 'mostly declarative' in the end.

E.g. not sure how Meson handles this, but when I have a project with dozens of similar build targets and platform specific compile options, I really want to do the build description in a loop instead of a data tree.

(for example: https://github.com/floooh/sokol-zig/blob/3f978e58712f9eb029b...)

PS: apparently Meson build scripts can also have variables, conditions and loops, which I guess makes the difference to an actually Turing complete build system rather esoterical?

https://mesonbuild.com/Syntax.html#logical-operations

A proper build system is so much more than just describing build targets and their dependencies, you also want to generate source code, copy and process data files, communicate with REST services etc... The more this happens in a 'real' programming language the better.



I fell in love with the ninja build system recently. It's machine language for build systems, and I can write my own scripts to generate the ninja build file, rather than introducing any new language from someone else just for build descriptions.

Is ninja not expressive enough for your needs?


Meson has the ability to generate code and process data files. Why do you need to communicate with REST? Meson support that however by allowing you to break out using the `run_command()` function.


Uploading build output somewhere for instance. However this may overlap with CI tasks (but there, usually YAML is used to run shell commands, which is also a bit of a crutch).


That is a task for CI, not for a build system. A build system should ideally be able to run in a container that has no network at all.


That's just your opinion though ;) Why should the process of producing a build artifact be different from putting the artifact into the right place? E.g. Makefiles usually have a 'make install' step which isn't all that different from uploading the build result somewhere, and make definitely counts as a build system.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: