Skip to content

Add a flag to print traces of compile errors #6942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 6, 2019

Conversation

anatoliykmetyuk
Copy link
Contributor

@anatoliykmetyuk anatoliykmetyuk commented Jul 26, 2019

No description provided.

@anatoliykmetyuk anatoliykmetyuk changed the title Close lampepfl/dotty-knowledge#15: Add a flag to print traces of comp… Close lampepfl/dotty-knowledge#15: Add a flag to print traces of compile errors Jul 26, 2019
@anatoliykmetyuk anatoliykmetyuk changed the title Close lampepfl/dotty-knowledge#15: Add a flag to print traces of compile errors Add a flag to print traces of compile errors Jul 26, 2019
@@ -135,6 +135,8 @@ trait Reporting { this: Context =>
def error(msg: => Message, pos: SourcePosition = NoSourcePosition, sticky: Boolean = false): Unit = {
val fullPos = addInlineds(pos)
reporter.report(if (sticky) new StickyError(msg, fullPos) else new Error(msg, fullPos))
if (ctx.settings.YdebugError.value)
println(Thread.currentThread.getStackTrace.mkString("\n"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can do Thread.currentThread.dumpStack()

@OlivierBlanvillain
Copy link
Contributor

Would it make sense to only print the first stack trace in case there is more than one error?

@smarter
Copy link
Member

smarter commented Jul 29, 2019

This is a bit redundant with -Xprompt, would be nice to unify the two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants