Bye bye, fast compilation times
Timothee Cour
thelastmammoth at gmail.com
Wed Feb 7 02:05:46 UTC 2018
how about using same syntax (and reusing logic) as newly introduced:
` -i=+foo.bar,+baz-baz.bad`
`dmd -unittest=+foo.bar,+baz,-baz.bad rest_of_arguments`
which would only enable unittests as specified? It's flexible and intuitive
On Tue, Feb 6, 2018 at 5:56 PM, Jonathan M Davis via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> 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
>
More information about the Digitalmars-d
mailing list