Jump to page: 1 2 3
Thread overview
[Semi-OT] On the topic of build tools
Aug 10, 2021
SealabJaster
Aug 10, 2021
Tejas
Aug 10, 2021
Dukc
Aug 10, 2021
Denis Feklushkin
Aug 11, 2021
Domain
Aug 12, 2021
evilrat
Aug 12, 2021
ted
Aug 12, 2021
SealabJaster
Aug 13, 2021
ruki
Aug 13, 2021
SealabJaster
Aug 13, 2021
Mike Parker
Aug 14, 2021
evilrat
Aug 15, 2021
Dukc
Aug 16, 2021
SealabJaster
Aug 20, 2021
SealabJaster
Aug 21, 2021
Abdulhaq
Aug 22, 2021
SealabJaster
Aug 23, 2021
Abdulhaq
Aug 24, 2021
SealabJaster
Aug 29, 2021
Abdulhaq
Oct 31, 2021
harakim
Aug 13, 2021
Paul Backus
Nov 02, 2021
Kagamin
August 10, 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!)

August 10, 2021

On Tuesday, 10 August 2021 at 01:11:45 UTC, SealabJaster wrote:

>

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.

[...]

If someone us really going to read, please also help in determining whether Microsoft's vcpkg can also be used for building D projects.

Thanks in advance.

August 10, 2021

On Tuesday, 10 August 2021 at 01:11:45 UTC, SealabJaster wrote:

>
  • Are there any build systems are aren't... 'awful', 'anti-fun', etc?

Quickly reading, it seems that you might like Reggae

>
  • 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).

The ones that I know and do so (DUB and Nix) can both be configured to use local directories as dependencies if you prefer to fetch stuff manually or with another package manager.

August 10, 2021

On Tuesday, 10 August 2021 at 01:11:45 UTC, SealabJaster wrote:

>
  • Meson

Pros:

  • It is hard to write working but unmaintainable scripts. Language constructed by way that Meson config files isn't evolve into spaghetti.
  • Many popular projects now move to Meson
  • Doesn't use (even if you really want to) the source tree for storing intermediate files or resulting binaries
  • Language independent
  • Easier to learn than cmake
  • Active development, many commits merged each day

Cons:

  • Harder to learn than DUB
  • Only few mesonified D packages
  • A lot of D-related bugs
  • Still need to understanding what really goes when you compile something, this isn't silver bullet
August 11, 2021

On Tuesday, 10 August 2021 at 01:11:45 UTC, SealabJaster wrote:

>

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.

[...]

https://github.com/xmake-io/xmake

You can try xmake.

August 12, 2021
On 10/8/21 10:41 am, SealabJaster wrote:
> 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.
> 

Have a look at:

https://github.com/GrahamStJack/bottom-up-build

Used in significant projects with both C++ and D involved. Handles code generated during a build (& its dependencies). Fairly simple configuration/setup.

Enforces simple dependencies (will refuse to build if there are circular dependencies).


August 12, 2021
Several people wrote:
> ...

Thank you all for your suggestions, XMake especially seems quite interesting to try out.

> A lot of D-related bugs

_oh yes there are_, regardless though, I think Meson is currently my personal favourite.

For the last few days I've been toying with the idea of "what would my own build tool look like?" and even hacked together something.

But what I'm finding is: it's quite difficult to design something cohesive; simple by default yet powerful when opted-in, and just in general is useful enough to be worth using instead of already existing tools (who would've thought). My lack of experience certainly doesn't help either >x)

Maybe there's a valid reason 200 different tools exist...
August 12, 2021

On Wednesday, 11 August 2021 at 00:02:38 UTC, Domain wrote:

>

On Tuesday, 10 August 2021 at 01:11:45 UTC, SealabJaster wrote:

>

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.

[...]

https://github.com/xmake-io/xmake

You can try xmake.

Looks nice and slim, but... I see too much stringly typed stuff using scripting language, not sure if it'll work for me over CMake even in mixed C++/D projects.

Also what catches my eyes is use of target() declaration and nested block, looks fishy to me.

August 13, 2021

On Tuesday, 10 August 2021 at 01:11:45 UTC, SealabJaster wrote:

>

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.

[...]

xmake can build a mixed c/dlang project, and supports built-in package dependency management. It also supports downloading integrated dlang modules from dub. For example add_requires("dub::zlib")

https://github.com/xmake-io/xmake/blob/test/tests/projects/dlang/console_with_pkgs/xmake.lua

August 13, 2021

On Tuesday, 10 August 2021 at 01:11:45 UTC, SealabJaster wrote:

>
  • It appears to be very difficult to make a build tool that isn't just make with a pretty coat of paint?

I haven't actually tried it with a real project yet, but one build tool I find interesting in this regard is redo:

https://redo.readthedocs.io/en/latest/

With redo, you specify your project's build process as a collection of imperative scripts, which generate dependency information as a side effect. This ensures that your dependency graph is always up-to-date, without requiring any of the crazy hacks you'd need for GNU make.

« First   ‹ Prev
1 2 3