A brief survey of build tools, focused on D
Atila Neves
atila.neves at gmail.com
Tue Dec 11 09:58:39 UTC 2018
On Monday, 10 December 2018 at 22:18:28 UTC, Neia Neutuladh wrote:
> On Mon, 10 Dec 2018 21:53:40 +0000, GoaLitiuM wrote:
>> The results for touching second file seems like an anomaly to
>> me,
>
> The generated ninja file had one rule per source file. If your
> modules tend to import each other a lot, or if they
> transitively import the code that's doing expensive stuff, then
> one rule per source file is bad. If your modules have few
> transitive dependencies and they're each fast to compile, one
> rule per source file is good.
In typical D code, it's usually faster to compile per package
than either all-at-once or per module. Which is why it's the
default in reggae.
> My project used Pegged, and a lot of stuff referenced the
> grammar. That meant incremental builds went long and it would
> have been better to build the whole project at once.
>
> Separating the grammar into a different build would reduce
> compile times significantly, and that might make incremental
> builds fast.
Using Pegged basically requires a dub subpackage with the grammar
to retain one's sanity.
> From discussions on IRC about reducing compile times, though,
> using Phobos is a good way to get slow compilation, and I use
> Phobos. That alone means incremental builds are likely to go
> long.
Yes. Especially with -unittest.
More information about the Digitalmars-d-announce
mailing list