If you use rdmd to compile (instead of dmd), you *just* give it
your *one* main source file (typically the one with your
"main()"
function). This file must be the *last* parameter passed to
rdmd:
$rdmd --build-only (any other flags) main.d
Then, RDMD will figure out *all* of the source files needed
(using
the full compiler's frontend, so it never gets fooled into
missing
anything), and if any of them have been changed, it will
automatically
pass them *all* into DMD for you. This way, you don't have to
manually keep track of all your files and pass them all into
DMD youself. Just give RDMD your main file and that's it,
you're golden.
I meant to ask, why would it recompile *all* of the source files
if only one changed? Seems like it only should recompile the
changed ones (but still compile them together as a unit.) Is it
because of bugs (e.g. the template problem you mentioned)?