Quality of errors in DMD

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Fri Sep 2 14:52:57 PDT 2016


On 9/2/2016 2:25 PM, Ethan Watson wrote:
> On Friday, 2 September 2016 at 21:16:02 UTC, Walter Bright wrote:
>> assert()s are there to check that impossible situations in the compiler don't
>> actually happen. They are not for diagnosing errors in user code.
>>
>> If a user sees an assert, it is a compiler bug and hopefully he'll submit a
>> bug report for it in bugzilla. There aren't many open assert bugs in bugzilla
>> because we usually put a priority on fixing them.
>
> You know, I'd love to submit a bug about it. But after actually working out the
> problem without the compiler's help, I can't get a minimal enough test case to
> submit a bug with. I'll try it with Dustmite. But in this case, there's debug
> code there to spit out the information it has. And probably a stack to give it
> context.
>
> This is legitimately the kind of stuff that drives an average user away from a
> language. I knew that commenting out one template invocation fixed my code, but
> not how to fix my template without a bunch of pain-staking removal and
> experimentation.

I understand your concern, and that's why we put a priority on fixing asserts 
that are submitted to bugzilla. But without a bug report, we are completely dead 
in the water in fixing it. It is supposed to never happen, that is why we cannot 
fix them in advance.

Using dustmite is a practical way to reduce the source code to a manageable size.

Having a compiler stack trace or it dumping its internal variables is unlikely 
to help anyone but the compiler devs.


 >  Call it what you want, but that's a bad user experience.

Yes it is, which is why we put a priority on fixing them.


More information about the Digitalmars-d mailing list