On Monday, September 26, 2011 18:27:05 Andrei Alexandrescu wrote: > On 9/26/11 6:05 PM, Jonathan M Davis wrote: > > This would definitely improve the Windows build, but I would suggest > > that both the Windows and Linux builds have a separate target which > > builds and runs all of the modules' unit tests at once in order to > > catch circular dependencies caused by static constructors. Obviously, > > both the Posix and Windows makefiles would need to be adjusted in order > > for that to work. > > Wouldn't the issues manifest themselves without the unittests?
Unfortunately, they can't be found at compile time. They only get found at runtime. If we compile all of Phobos' unit tests in one executable, then we find them when the unit tests run. If we don't, then we only find them when someone runs into the issue and reports a bug. Every circular dependency that I've seen in Phobos thus far was caught by the Windows unit tests and not the Posix unit tests, because the Windows units compiling everything into one executable, and the Phobos unit tests split all of the modules up. In general, splitting the modules up is better, but it does fail to catch this one problem, which is why I'm suggesting that we have a separate make target for building and running all of Phobos unit tests in one executable. It will make it easier to test for circular dependencies, and it will also make it easier to benchmark how well dmd is doing at compiling a lot of code at once. - Jonathan M Davis _______________________________________________ phobos mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/phobos
