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.

Reply via email to