On Saturday, 6 April 2013 at 17:52:40 UTC, Andrej Mitrovic wrote:
But RDMD can track changes to dependencies, which DMD still can't do.
I want to try implementing this feature in DMD and see the speed
difference for incremental builds.

By "incremental builds", do you mean skipping compilation of certain modules, and re-using object files from previous builds?

Currently, rdmd deletes all generated modules after building, to save disk space, as those modules are not reused in subsequent builds. The only thing that rdmd caches, is the full list of source files in the program (so it knows which files to check to see if they've been edited), and the executable.

Actual incremental compilation with just one compiler invocation would certainly be a big speedup for large projects. As I understand, there were some problems with how dmd places data in object files that prevented implementing this, however that's been put into question recently:
http://forum.dlang.org/post/mailman.508.1365074861.4724.digitalmar...@puremagic.com

I wonder if it's somehow related to Dicebot's findings in another recent thread:
http://forum.dlang.org/post/gxscuhrvcpnuzvgyy...@forum.dlang.org

The compiler's verbose (-v) output, which is what rdmd currently uses, does not specify which modules depends on which - it simply lists all the files that took part in the compilation. There exists a separate option, -deps, which lists actual inter-module dependencies - judging by the identifiers, this is what rdmd used at some point. However, -deps output does not specify things such as import()-ed files. eskimor on IRC attempted to rectify that, here:
https://github.com/D-Programming-Language/dmd/pull/1839
However, as we've discussed, I think improving -v output would be better than adding a new switch to the compiler.

Reply via email to