Thread overview
Reggae: a metabuild system in D (Daniel, you should read this). Now with more dub. And package builds.
Jun 02, 2015
Atila Neves
Jun 02, 2015
BlackEdder
Jun 02, 2015
Atila Neves
Jun 04, 2015
Dicebot
Jun 04, 2015
Dicebot
Jun 04, 2015
Atila Neves
Jun 05, 2015
Ronnie
June 02, 2015
http://code.dlang.org/packages/reggae

Daniel: see last paragraph (see, I mentioned your name! ;) )

Let's see if I can explain it better this time. Reggae is:

. An executable and a library of data definitions to describe build systems declaratively, in D. It also allows for imperative code when needed, since the definition language is D
. A collection of low-level primitives to describe a build DAG, making completely arbitrary builds possible
. A collection of high-level convenience rules for C, C++ and D builds
. The high-level D rules provide a per-package compilation model by default, but there's a command-line switch to build per file
. Automatic dependency tracking for C, C++ and D builds
. Integrates with dub for package management, reggae delegates to it
. An API to use dub project configurations, builds and source files
. A seamless way to get out-of-tree builds with make or ninja for dub projects. No configuration needed! Simply type `reggae -b make /path/to/project` or `reggae -b ninja /path/to/project` from where you want to build it and that's that.

Reggae depends on `dub describe` to get the information from dub it requires to generate a build system. Unfortunately, "dub describe" is currently buggy for `dub.json` files with configurations, which are most of them. Fortunately, I fixed the bug and there's an open pull request at https://github.com/D-Programming-Language/dub/pull/577. If it doesn't work for you, clone my repo, build the dub version from there and make sure it's in your `PATH` when you run reggae. If your project happens to not have configurations in your dub.json, the latest dub release should work just fine.

You should get faster builds out of the box. I have to run more tests, but using the Ninja backend I managed to do a build of vibe.d 2x faster after changing `core.d` than the equivalent build using dub. I guess YMMV and is probably especially dependent on how many

Please try to use it and complain about the API so I (we?) can make it better. This for me is the bare minimum to make it work; there are several open questions I have myself, who knows what'd happen if someone were to use this for an actual production build. I'd write a blog about it but it's early days methinks.

I'm going to try and make the JSON dependency a compile-time option so that a version of reggae can be built that doesn't support dub. I'm also going to see if I can get a binary backend going that isn't particularly fast but works; the idea being to not depend on make, ninja, or in the future, tup.

Atila
June 02, 2015
On Tuesday, 2 June 2015 at 13:45:40 UTC, Atila Neves wrote:
> http://code.dlang.org/packages/reggae
>
> Atila

Does reggae make it easy to build multiple executables in one go? Or is it limited to one executable per configuration (as dub)?

Cheers, Edwin

June 02, 2015
On Tuesday, 2 June 2015 at 14:18:29 UTC, BlackEdder wrote:
> On Tuesday, 2 June 2015 at 13:45:40 UTC, Atila Neves wrote:
>> http://code.dlang.org/packages/reggae
>>
>> Atila
>
> Does reggae make it easy to build multiple executables in one go?

Yes. Reggae is able to build itself, its own build description produces a ut binary and the production binary concurrently. It's the example in the README.

Anything you want to build and any way you want it, reggae lets you. If it doesn't then that's my fault, and I'll fix it.

Atila


June 04, 2015
Looks promising so far. I will create separate issues in actual repo for desired improvements.
June 04, 2015
https://github.com/atilaneves/reggae/issues

I think this is all I would want before considering to try reggae as my main build system. Concept worked pretty good so far and I feel very satisfied with what we can potentially get from it - though, I must admit, I haven't tried to port any of more advanced makefiles to it.

I'd suggest to try reimplementing DMD/Phobos makefiles with reggae once you are confortable with a design to see if it really works up to expectations. These contain some rather nasty rule mess and can serve as both great playground for checking design choices and selling point in improving simplicity / clarity.
June 04, 2015
On Thursday, 4 June 2015 at 01:20:18 UTC, Dicebot wrote:
> https://github.com/atilaneves/reggae/issues
>
> I think this is all I would want before considering to try reggae as my main build system. Concept worked pretty good so far and I feel very satisfied with what we can potentially get from it - though, I must admit, I haven't tried to port any of more advanced makefiles to it.
>
> I'd suggest to try reimplementing DMD/Phobos makefiles with reggae once you are confortable with a design to see if it really works up to expectations. These contain some rather nasty rule mess and can serve as both great playground for checking design choices and selling point in improving simplicity / clarity.

The idea was to eventually use it for DMD/Phobos/druntime but as you said, those Makefiles are pretty hairy and it'll take some work. I've even considered some way of automatically porting... but that's obviously quite a bit of work as well.

Atila
June 05, 2015
D is lacking a cohesive package and build system, at least on the order of something like python (and even rust) to really take off.

Dub is ok, but it needs to work to gather all the dependencies (including impure "c" libraries).

I really like D, but coding in python to try out new libraries is a zero thought process. To do this in D right now there is definitely friction.

Hope this is the solution to all of this.

PS. Needs to work in Windows too (32/64bit)

Ronnie