DMD diagnostic - any way to remove identical lines from final dmd error log?
Don Clugston
dac at nospam.com
Tue Aug 14 03:15:35 PDT 2012
On 14/08/12 11:32, Paulo Pinto wrote:
> On Tuesday, 14 August 2012 at 08:48:14 UTC, Don Clugston wrote:
>> On 14/08/12 08:59, Don Clugston wrote:
>>> On 13/08/12 18:47, Dmitry Olshansky wrote:
>>>> I seriously consider writing a simple postprocessor for dmd's output.
>>>> Once dmd became able to recover from errors and crawl on it started to
>>>> produce horrific amounts of redundant text on failure.
>>>>
>>>> Observe for instance that there are only 6 + 2 = 8 lines of interest:
>>>
>>> Spurious or repeated error messages should be considered to be bugs.
>>> Please put test cases in Bugzilla. A long time ago, the compiler used to
>>> spew reams of garbage all the time. Now it rarely happens.
>>>
>>>> Other food for thought is to try to indicate explicitly which errors
>>>> are related vs unrelated, which are collateral, like failed template
>>>> instantiation that rolls out the whole path of failure (but one have to
>>>> read the text carefully to get where it starts).
>>>
>>> That's already happening. Supplemental messages don't have the word
>>> 'Error' at the start of the error message.
>>
>> One fairly easy way to solve this, would be that once a template
>> *instantiation* has failed, the template *definition* would be marked
>> as doubtful, and any further instantiation using that definition would
>> have all error messages suppressed. If an error occurred, a single
>> error would be produced stating that the template instantiation failed.
>>
>> The downside would be that if the template instantiation failed for a
>> completely different reason the second time, its root cause error
>> would not be shown. But this latest release is the only time such
>> errors have been shown anyway.
>
> Personally I loved the way Turbo Pascal used to work with compile
> failure on the first error.
>
> Thanks to the fast compile times, it was easier and faster to
> fix-compile-find_next_error, than try to sort out the real errors from a
> dump of error messages.
To the best of my knowledge, DMD gives very few error messages which are
not real. Every release, I eliminate a couple more spurious ones. It's
starting to be difficult to find them.
Seriously, if you are finding ANY error messages for things which are
not real errors, that is a bug.
>
> But I seem to be in the minority regarding compiler error messages.
>
> --
> Paulo
More information about the Digitalmars-d
mailing list