[dmd-internals] test failures

Don Clugston dclugston at googlemail.com
Fri May 20 00:16:08 PDT 2011


On 19 May 2011 17:54, Robert <robert at octarineparrot.com> wrote:
> On 19 May 2011 12:45, Steve Schveighoffer <schveiguy at yahoo.com> wrote:
>>
>> How is this related to the size of std.datetime?  It's pretty clear the
>> failure is on line 842.
>>
>> Just isolate that line and its related setup, and you should find the
>> minimal test case.  Or am I missing something?

The "related setup" is the problem. It's scattered all through the file.

> I believe the issue isn't std.datetime directly, but it takes time to narrow
> down a testcase from a 30kLoC file, even if you know the exact line that's
> failing!

Apart from the size, a particular problem with std.datetime is that it
has unittests _inside_ struct declarations.
This makes the code practically unreadable, especially since those
unittests are enormous, and it makes bisection a very painful, manual
process. 30K lines with only a few blocks of unittests wouldn't be a
problem.

Previously, that single module has cost me at least twenty hours of
time in bisecting bugs. I've spent a couple of hours on reducing down
this bug already, and I'm still many hours away from a reduced test
case. I find this extremely frustrating, since intrinsically it's a
very simple module. Basically, it's unmaintainable code.


More information about the dmd-internals mailing list