-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Hide stack traces behind -Ydebug #1057
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
Conversation
They're not very useful for end users and some tests like tests/neg/selfreq.scala always print these exceptions which makes it harder to read the test logs, Also use Thread.dumpStack() instead of creating an Exception and calling printStackTrace() on it.
3fb8fb1
to
11df014
Compare
Look what happens when a user tries to compile
Note that I'm not disabling stacktraces when the compiler fails with an exception, I'm only disabling stack traces that are explicitly printed in random places in the compiler with |
OK, I understand the reasoning that we want to hide these stacktraces by default because they do not signify real compiler crashes. Can you try to do the whole test suite under -Ydebug? If that passes, we are good. If not, we need to either debug -Ydebug first, or else create a more specific option (-Ydebug:stacktraces?), or else |
98cf50f
to
ee67cd9
Compare
This now works after dotty-staging@a6719ec and dotty-staging@ee67cd9 |
@smarter could you maintain dotty-staging@a6719ec under a |
This makes the compiler extremely slow. To store the trace, you now need to pass -Ytrace-context-creation
Instead, a new setting called -Yplain-printer is used for this. After this commit, we can now run all tests with -Ydebug (this was not the case before because using the plain printer breaks -Ytest-pickler)
ee67cd9
to
b33babc
Compare
@DarkDimius : done! |
/rebuild |
Hide stack traces behind -Ydebug
They're not very useful for end users and some tests like
tests/neg/selfreq.scala always print these exceptions which makes it
harder to read the test logs,
Also use Thread.dumpStack() instead of creating an Exception and calling
printStackTrace() on it.
Review by @odersky or @DarkDimius