Jump to page: 1 2 3
Thread overview
reggae v0.10.0 - The meta build system just got better
Sep 07, 2023
Atila Neves
Sep 07, 2023
German Diago
Sep 07, 2023
Atila Neves
Sep 09, 2023
Anonymouse
Sep 11, 2023
Greggor
Sep 11, 2023
Adam D Ruppe
Sep 12, 2023
Atila Neves
Sep 12, 2023
Adam D Ruppe
Sep 15, 2023
Atila Neves
Sep 18, 2023
Adam D Ruppe
Sep 12, 2023
zjh
Sep 20, 2023
Andrey Zherikov
Sep 20, 2023
Atila Neves
Sep 21, 2023
Paolo Invernizzi
Sep 21, 2023
Andrey Zherikov
Sep 21, 2023
Atila Neves
Sep 26, 2023
Andrey Zherikov
Sep 27, 2023
Atila Neves
Sep 27, 2023
Imperatorn
Sep 21, 2023
jmh530
Sep 21, 2023
Atila Neves
Sep 21, 2023
jmh530
September 07, 2023

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.
September 07, 2023

On Thursday, 7 September 2023 at 17:34:48 UTC, Atila Neves wrote:

>

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

How mature is the build system? FWIW, I would like to stay in Meson if I can, since I use C++ also and that makes combining libs and other niceties easier.

September 07, 2023

On Thursday, 7 September 2023 at 21:25:27 UTC, German Diago wrote:

>

On Thursday, 7 September 2023 at 17:34:48 UTC, Atila Neves wrote:

>

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

How mature is the build system? FWIW, I would like to stay in Meson if I can, since I use C++ also and that makes combining libs and other niceties easier.

Mature enough that we've been using it at work for years now, but YMMV depending on what you use it for. It also supports C++ BTW.

September 09, 2023

On Thursday, 7 September 2023 at 17:34:48 UTC, Atila Neves wrote:

>

[...]

Can reggae handle non-trivial dub builds with trees of dependencies?

I gave it a quick test, following the examples in the readme, and the Makefile it generated looked for sources in the wrong place. It also didn't build the dependencies (nor even include their source directories as import paths). Maybe I'm doing it wrong.

September 11, 2023

On Thursday, 7 September 2023 at 17:34:48 UTC, Atila Neves wrote:

>

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.

[...]

I spent a some time getting a part of my project to build with Reggae & so far I am impressed, The partial compiles are really good, I am looking forward to switching!

My largest complaint is that Reggae needs improvements to it's documentation, there was enough of it for me to get started and I can figure it out, but I do not feel that anyone can just jump right into using it. But this is not a unique problem especially with build systems, so this is a nitpick.

September 11, 2023
I tried reggae today. It did not go well.

http://dpldocs.info/this-week-in-d/Blog.Posted_2023_09_11.html#reggae-editorial
September 12, 2023

On Thursday, 7 September 2023 at 17:34:48 UTC, Atila Neves wrote:

>

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

You can use professional xmake,
It's very convenient.

September 12, 2023
On Monday, 11 September 2023 at 23:15:28 UTC, Adam D Ruppe wrote:
> I tried reggae today. It did not go well.
>
> http://dpldocs.info/this-week-in-d/Blog.Posted_2023_09_11.html#reggae-editorial

One thing I learned from you is that for small projects `dmd -i` is just as fast as incremental compilation, which is rather surprising to me. It does mean adding `-I` flags to every dependency though, so there's that.

And for larger codebases `dmd -i` can't and won't work.
September 12, 2023
On Tuesday, 12 September 2023 at 13:12:29 UTC, Atila Neves wrote:
> It does mean adding `-I` flags to every dependency though, so there's that.

Not if you install them properly.

> And for larger codebases `dmd -i` can't and won't work.

Define "larger".
September 15, 2023
On Tuesday, 12 September 2023 at 13:17:50 UTC, Adam D Ruppe wrote:
> On Tuesday, 12 September 2023 at 13:12:29 UTC, Atila Neves wrote:
>> It does mean adding `-I` flags to every dependency though, so there's that.
>
> Not if you install them properly.

That's the job of the package manager does that. An argument could be made that it could/should install the dependencies such that only one `-I` flag is needed. Even then, I'm not sure how it'd handle different versions of the same package unless it did something like what Ikey showed at DConf.

>> And for larger codebases `dmd -i` can't and won't work.
>
> Define "larger".

~190k SLOC (not counting the many dub dependencies) killed dmd on a system with 64GB RAM + 64GB swap after over a minute. Even if it worked, it'd be much, much slower.


« First   ‹ Prev
1 2 3