On Thursday, 27 November 2014 at 20:17:55 UTC, Dmitry Olshansky
wrote:
What I know(?) so far:
1. First we build library in one go - trivial to reproduce.
2. Then we compile each unittest with -c and -deps to dump
actual dependencies.
Yes, we compile one object file per module because memory doesn't
suffice to build everything at once.
3. Then we run a bunch of sed/sort/uniq to extract module names
from verbose output of compiler (red flag IMHO, but anyway).
https://github.com/D-Programming-Language/phobos/blob/master/posix.mak#L325
Converting DMD deps output to makefile dependency rules, what's
the problem with that?
4. We promptly ignore these files afterwards...
No, they are included as dependencies.
https://github.com/D-Programming-Language/phobos/blob/a0de97d5ca42f4ac861f6c8f88ab75a7108c3f09/posix.mak#L275
5. We build a unittester from Druntime (pulling sources out of
tree - omg) with ALL of object files:
https://github.com/D-Programming-Language/phobos/blob/master/posix.mak#L334
That's the test runner, didn't make to copy the sources, because
Phobos already depends on druntime anyhow.
6. Run it passing a specific module to unittest:
https://github.com/D-Programming-Language/phobos/blob/master/posix.mak#L355
Yep, this is so because all unit tests live in a shared library.
So we need a special test runner to run only a single module,
allowing us to still parallelize testing.