On Wednesday, February 07, 2018 01:47:19 jmh530 via Digitalmars-d wrote: > On Wednesday, 7 February 2018 at 01:20:04 UTC, H. S. Teoh wrote: > > So I'd like to propose that we do something similar to what we > > did with template instantiations a couple of years ago: make it > > so that unittests are only instantiated if the module they > > occur in is being compiled, otherwise ignore them (even in the > > face of -unittest). This way, adding unittests to Phobos won't > > cause unintentional slowdowns / unittest bloat across *all* D > > projects that import the affected Phobos modules. (Seen from > > this angle, it's a pretty hefty cost.) > > Would it help to take the approach of mir, i.e. putting > version(mir_test) before all the unittests?
It would, but if we have to do that in front of all unittest blocks in a library, I think that that's a strong sign that the current design has a serious problem that should be fixed if possible. - Jonathan M Davis
