-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #4217: display warnings in repl #4269
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
@@ -235,6 +235,9 @@ class ReplDriver(settings: Array[String], | |||
val newImports = newState.imports ++ extractImports(parsed.trees) | |||
val newStateWithImports = newState.copy(imports = newImports) | |||
|
|||
implicit val ctx: Context = newState.run.runContext |
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.
I don't think this implicit context is needed.
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.
You are right, an implicit State is required.
@@ -235,6 +235,9 @@ class ReplDriver(settings: Array[String], | |||
val newImports = newState.imports ++ extractImports(parsed.trees) | |||
val newStateWithImports = newState.copy(imports = newImports) | |||
|
|||
implicit val ctx: Context = newState.run.runContext | |||
displayErrors(newState.run.runContext.flushBufferedMessages()) |
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.
Can you add a comment saying that this code displays warnings. Otherwise it confusing (the name of the function is misleading).
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.
Can that function get renamed a bit?
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.
Sure, it's for another PR :)
Fix #4217: display warnings in repl