Compilation is taking a ton of memory
crimaniak
crimaniak at gmail.com
Thu Jun 28 19:34:58 UTC 2018
On Thursday, 28 June 2018 at 16:24:07 UTC, H. S. Teoh wrote:
> On Thu, Jun 28, 2018 at 04:11:57PM +0000, crimaniak via
> Digitalmars-d wrote: [...]
>> The problem is aggravated by the fact that DUB compiles all
>> the sources in one DMD launch.
>
> Doesn't dub have an option to compile packages (i.e. subdirs)
> separately? Or does that only apply to dub packages, not to
> subdirs within a single project?
Yes, it's about dub packages, not about subdirs. And yes, it's
possible to split project to subpackages, it gives its benefits
and structure code, but I hate the idea of doing this forcibly,
just to fix compilation time. In addition, a typical large site
is a large number of pages with diet templates, and even if you
separate the pages from business logic, but this part itself is
still very large and slow in compilation. I had to refuse diet
rendering on the server and go to Vue+pug, which allowed to
accelerate the development cycle when changes on the frontend
from 2 minutes to instantly.
> [...]
>
> This is one of the reasons I was not impressed by dub (sorry,
> Sonke). I continue to use SCons for my D projects...
I believe that this situation is bad for D as a whole. The
problem with large projects can be solved by splitting into
subpackages, or with Scons, or with reggae, or manually writing
the makefile, etc., etc., but the person who just started writing
on D does not know all this. He simply does the project and with
his growth discovers this problem. I think the modern programmer
has the right to expect that the official build system will work
well enough with a project of several thousand files.
More information about the Digitalmars-d
mailing list