Any suggestions on dmd error message formatting?

Chris Piker chris at hoopjump.com
Sat May 15 04:54:15 UTC 2021


Hi D

So the compile error messages getting from dmd are starting to 
remind me of the notorious 130 line error message I once got from 
a C++ compiler for missing a comma in a template.  :-/

(After fixing that bug, I left work early and came back the next 
day with a python book.)

So, like the noob I am, I've been copying error messages to a 
text editor, deleting all the @ annotations, replacing common 
patterns with short tokens, indenting the result, and then trying 
to understand the problem.

I figured this community is so inventive that I'm obviously doing 
it wrong and that there is a better way.  So does anyone have any 
suggestions on how I make error messages like this one more 
grokable?

```
das2/range.d(359,31): Error: constructor 
das2.range.PriorityRange!(DasRange!(Tuple!(int, int)[], int 
function(Tuple!(int, int)) pure nothrow @nogc @safe, int 
function(Tuple!(int, int)) pure nothrow @nogc @safe, Tuple!(int, 
int), int), int function() pure nothrow @nogc 
@safe).PriorityRange.this(DasRange!(Tuple!(int, int)[], int 
function(Tuple!(int, int)) pure nothrow @nogc @safe, int 
function(Tuple!(int, int)) pure nothrow @nogc @safe, Tuple!(int, 
int), int) range, int function(Tuple!(int, int)) priority) is not 
callable using argument types (DasRange!(Tuple!(int, int)[], int 
function(Tuple!(int, int)) pure nothrow @nogc @safe, int 
function(Tuple!(int, int)) pure nothrow @nogc @safe, Tuple!(int, 
int), int), int function() pure nothrow @nogc @safe)
```

As always, your advice is much appreciated



More information about the Digitalmars-d-learn mailing list