https://code.dlang.org/packages/reggae

For those who don't know, reggae is a meta-build system for and in D. It's like CMake, if you replace their terrible language with D*. Like CMake, it can output make and ninja files. Unlike CMake, it can also output tup files and has its own binary generator in case the dependency on one of those programs is undesired. Also unlike CMake, it supports dub projects out-of-the-box by using dub as a library.

TL;DR: you can use to build your dub project and it'll be faster and not rebuild the whole thing if you only change one module**.

Highlights of this release:

When dinosaurs roamed the Earth, `dmd -makedeps` didn't work so to automatically handle dependencies between D modules reggae had to wrap the compiler with a binary named `dcompile`. This would call the compiler with `-v`, get the imports from the output, and use them to only rebuild what was necessary. Now that `dmd -makedeps` got fixed, the extra complication (and time to build the extra binary) is gone.

Default dub builds are much faster now. Before, reggae would create a reggaefile.d if one didn't exist for dub projects. I got tired of waiting for the compiler, and realised that I don't actually have to compile D code on-the-fly if I know ahead of time what the code is anyway. Now, reggae immediately*** spits out the build files for such projects.

Automatically detect when new files are added/deleted: this is the main reason that the CMake devs erroneously advise people to not use "globs" to just "give me all the source files". The issue is when the file list changes, you need to remember to rerun the metabuild system to detect the filesystem changes. No more: reggae builds now rerun reggae when files are added or deleted. Tup, of course, has always done this but it's the only one I know of that did.

Before, if the compiler binary changed, then... oops it was if you rebuilt in between updating your distro. Now the object files depend on the compiler binary.



* Or Python, Ruby, Javascript, or Lua.
** Unless you made every module depend on every other module, in which case, don't do that.
** dub can be slow to start up. Slows for me is ~200ms.

Reply via email to