[Semi-OT] On the topic of build tools
SealabJaster
sealabjaster at gmail.com
Tue Aug 10 01:11:45 UTC 2021
This is a rather aimless discussion, but I wanted to get this off
my mind since I've been hopping around different build systems
recently. Also it's 2am.
I've recently started to move out of my shell of cushy build
systems managed by an IDE, or super simple ones like Dub, and
have tried out a few different build tools now:
* CMake
* Scons
* Meson
* Bazel
Cmake: I like it when I'm not the one writing it. Its language
feels like it has the same backwards compat and weird syntax
issues that C++ deals with, which I found kind of ironic.
Scons: I don't know why but I couldn't get my head around it. I
found it confusing where I simply wanted to include a simple D
library into a simple D app.
Meson: I actually kind of like Meson because it seems to focus on
being a build tool and not a complete language + dep manager +
everything and the sink. It does feel a bit rigid, and the D
support is iffy (I still can't figure out how to make the auto
dub config spit out dub dependencies), but was probably the most
useable one for D.
Bazel: I'm still mentally recovering.
My questions are simple, but I fear the answers are far, far from
it:
* Are there any build systems are aren't... 'awful', 'anti-fun',
etc?
* Build tools for some reason decide that they should also be
pseudo or actual package managers. How much could a realistic
tool be decoupled from having to manage dependencies (it'd of
course need to know about subprojects and the like).
* What would the ideal build tool look like, and be able to do?
Especially in regards to its configuration language.
* It appears to be very difficult to make a build tool that isn't
just `make` with a pretty coat of paint?
Some tools feel so rigid and inflexible, even if you stay within
bounds of its supported languages, whereas other tools feel far
too 'free' in a sense that there's no clear direction on how to
do certain things, even if they're technically possible.
As my autism-ridden brain loves to do, it got rather obsessed
with this topic for a while, and I simply wanted to see what the
general feelings on these tools are on this forum, because all
the tools seem to be "necessary evils" rather than "gifts from
god" in terms of their usage and popularity compared to their
difficulties and downfalls.
I find Bazel's approach quite interesting: being able to download
tools and language support straight from the same language that
configures your builds. I believe language support is also added
via said language.
I found the idea of using two languages interesting: e.g. use
something like LUA to defines tooling, how to build X files,
etc., then something more constrained and declarative like SDL to
make use of the things the backend language provides. So
essentially a seperation of concerns between the extension and
configuration languages.
Sorry if this is a bit incoherent, but I'm finding it kind of
hard to express what my thoughts are on the topic. I guess my
main desire is to simply start a discussion on what potential a
'proper' build tool could have compared to what's currently out
there.
I've seen previous discussions before about separation between
building, dependency management, dependency+tool fetching, etc.
and it feels like an interesting topic for how 'bad', fractured,
and so on the actual tooling is.
Also: https://xkcd.com/927/
Apologies for the faff, but I literally feel an urge to post this
for some reason, and it's difficult to resist that feeling.
(also p.s., as I tend to do, I'll wake up tomorrow and feel too
scared to reply, so I'll definitely see any replies, but may not
respond. Sorry!)
More information about the Digitalmars-d
mailing list