quoting from newsgroup post from you:
It should work for simple cases (when the program can compile after all files' contents is moved into one single file). The obstacles with making it more flexible are that 1) to merge every pair of files, it would have to try N*(N-1) combinations; 2) it doesn't know which file is the "main" program file (the file which must be present for the test script to succeed), if there is one.
A)
for 1, you could attempt to only merge a into b, where b is the only module that imports a.
B)
For 2, you can just provide a flag to dustmite:
dustmite -main=main.d ....
if no flag is specified, you may even just not attempt to do any file merging.
As a user of dustmite, i'd rather take the pain to specify more things to help dustmite than to have dustmite do a suboptimal reduction which i'll have to reduce. Specifying main file is very easy. There could be more flags to help reduction.
C)
in my experience the test.reduced files are left identical to source during reduction and only when process completes it shows the reduced files. Is there a way to have the reduced files being indeed the current best reduced files during reduction process ?
I maybe be wrong about that one, maybe it was due to case D below.
D)
i had a very long running dustmite which eventually consumed all my memory (i have 16GB) ; i had to kill the process. Upon killing the test.reduced didn't reduce anything despite going through many iterations. When i kill dustmite at any time in the middle, i would expect to have a well defined state where the test.reduced do satisfy the dustmite condition. Is that supposed to be the case? There are easy ways to make this fail safe (eg saving a tar file of last known good test.reduced)
E)
is it 100% safe to use dustmite on a source tree (ie it will not affect it, even the .o files)? wasn't 100% sure. right now i always made a copy before doing any reduction, in part because it contained some .o files that dustmite complained about.
F)
can it also (optionally) reduce phobos modules? right now it seems to leave them untouched. this would help with debugging phobos issues.
G)
usuall i have to write:
-Ipwd
in command line flag passed to dustmite to make sure it will refer to the correct include directory in the test.reduced files. This is a bit restrictive (eg restricts from where you can run the command). Can we have instead:
dustmite -dir_reduced=my_dir_reduced -before=dir_base=my_dir_source -after=dir_base=my_dir_reduced '-I$dir_base $dir_base/main.d'