Dependency management in D

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Fri Sep 19 04:07:04 PDT 2014


In general D with current compiler technology is not very 
suitable for incremental rebuilds. In C there is a very simple 
separation between implementation and the imported interface. C++ 
makes it much harder by introducing templates which also must be 
present in header files - it took quite a while for C++ compilers 
to stop screwing incremental compilation in presence of templates 
and optimization. For D it is even harder because of CTFE and the 
fact that by default .di headers are not generated.

For now compiling everything in one go is much superior strategy 
assuming you have enough memory. In future incremental 
compilation topic may be revisited when something like compiler 
daemon becomes feasible, one that will be able to cache AST level 
entities and their dependencies, as opposed to filesystem level 
entities.


More information about the Digitalmars-d mailing list