-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
REPL summarizes warnings #7756
REPL summarizes warnings #7756
Conversation
I've moved this to the 2.13.1 milestone since it isn't really a release blocker, but it would certainly be very good to have this fixed. |
|
af2347c
to
22e8876
Compare
Very tough to reason about a stew of side effects. I had even forgotten who tells global what is the current run. (Answer is the current run.) This fix is to remove |
22e8876
to
ef48850
Compare
Emit the summary after successful parse in case "there were deprecations". To reduce repetitive parser warnings on multiline input, only reset the reporter after a final parse and also after final compilation result (a result that is not incomplete, but may represent either a compile error or success). The underlying global compiler will also reset the reporter before compilation of repl artifacts.
ef48850
to
0e6426d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change sounds good and the diff looks reasonable, and all the tests are passing. I think it would be good to capture this as a test no? I don't exactly see the behaviour you describe in the transcript in the PR description in any of the changed tests.
The updated check files demonstrate parser-based deprecations warning is shown now. I'll see if a repl test will show the multiline case not warning on every line, see the comment from last Valentine's. |
With deprecation enabled:
versus
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Note that |
Emit the summary "there were deprecations" after
successful parse.
Tweaks #7482
Previously, fatal warning trumped incomplete input, so switch that around. Previously:
Wait for complete input to issue summary.
Summary,
-deprecation
,-Xfatal-warnings
:Fixes scala/bug#11402