Errors with no context
Steven Schveighoffer
schveiguy at gmail.com
Mon Aug 17 15:15:09 UTC 2020
I'm looking at a weird failure in Phobos CI.
The single line is this:
std/range/package.d(921): Deprecation: storage class `ref` has no effect
in type aliases
The error itself is not what I want to complain about. What is annoying
to me is, this is inside a template. I have no idea where it was trying
to compile this from or what parameters were used.
However in other cases, an entire "stack trace" of the compilation will
be shown, i.e. "failed to compile this template", "instantiated from
here", etc.
Can we make sure all template compilation errors print this stack trace?
It's immensely useful, and sometimes completely required in order to
understand why an error is happening. At the very least, it should
display the template parameters being used to compile the code.
This would go a long way to make D errors easier to understand. A lot of
effort has gone into recently showing what template constraints don't
work, which has been great!
I'm hoping there is a general way this can be enabled.
-Steve
More information about the Digitalmars-d
mailing list