chapel-lang/chapel

Resolution-time errors should hint at --print-callstack-on-error

Open

#5,245 opened on Jan 25, 2017

View on GitHub
 (11 comments) (0 reactions) (2 assignees)Chapel (446 forks)auto 404
area: Compilergood first issuehelp wanted / stealtype: Feature Request

Repository metrics

Stars
 (2,010 stars)
PR merge metrics
 (PR metrics pending)

Description

Feature Request

The --print-callstack-on-error can be very helpful for tracking down certain classes of resolution-time bugs, but is not well-known to users and is something we've avoided turning on by default because of the amount of information it can generate, which can sometimes overwhelm if you're not prepared for it. I think this continues to be the right default.

This issue asks whether we could have the compiler print out a hint indicating that it might be useful in appropriate cases. My thought is that if we reach the place where we say "print out the callstack if the flag is thrown", if it hasn't been thrown, we could print something like "If you need more context for this error, see the --print-callstack-on-error flag" (or "try recompiling with the...").

Probably this change will require a lot of .good and .bad file updates.

@vasslitvinov suggests that an improvement on the above would be to only print the hint in the event that throwing the flag would in fact print out useful information (e.g., > 0 additional stack frames).

One other extension that could be done would be to suggest using --print-callstack-on-error and --devel in the event that they've thrown the former, but not the latter, and it would result in additional/different information.

Contributor guide