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

>, but what is there to be opinionated about with a build system?

I think you're saying this because your idea of a "build system" is a very simple set of sequential steps from known source code input files to an output binary.

The differing opinions come in when the "build system" includes various contradictory philosophies of how to configure and specify the building of complex software.

Different opinions on:

- syntax : should build config be XML, or JSON, or YAML, or custom syntax? E.g. Ant and Maven used XML but Gradle does not

- dependencies search: should build system implicitly find and add relevant dependencies? Or should programmer explicitly specify each one?

- reproducible builds (version pinning) vs auto-updated dependencies.

- should the build system be "smart" about cross-platform differences? If yes, you end up with complicated build tools like GNU Autoconf "configure" bash script, or CMake's complex syntax.

- should build system do optimization and bundling tasks that's not strictly limited to "compile" steps? Some Javascript build tools try to eliminate redundant or unused js code to make downloads smaller.

- etc, etc.

I also recommend reading the blog post "So you want to write a package manager"[1] to get an idea of how complicated a build system can get. The title says "package manager" but much of the material is also about build systems.

The bottom line is that reasonable people can disagree on the priorities and therefore, you can't create The One & Only Build System to End All Other Build Systems.

[1] https://medium.com/@sdboyer/so-you-want-to-write-a-package-m...



I feel like there is a ‘best’ answer to most if not all of these questions, and the build system should standardize on whatever that best practice is.

It’s great that Timmy thinks an obscure extension of YAML is the best way to define build configs, but all the rest of the engineers use JSON, so that is what we use.




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

Search: