Skip to content

Commit

Permalink
Use -Xnojline option when starting console
Browse files Browse the repository at this point in the history
Since we are using Nailgun, the REPL is being run in a different
process than the one connected to the user's terminal, so we cannot
run Scala's ILoop with InteractiveReader - we must use SimpleReader
instead. By passing -Xnojline argument to AnalyzingCompiler.console we
make sure that it will use SimpleReader.

Fixes scalacenter#385.
  • Loading branch information
tues committed May 3, 2018
1 parent cb38261 commit 1500638
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/main/scala/bloop/engine/tasks/Tasks.scala
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ object Tasks {
val loader = ClasspathUtilities.makeLoader(classpathFiles, scalaInstance)
val compiler = state.compilerCache.get(scalaInstance).scalac.asInstanceOf[AnalyzingCompiler]
val classpathOptions = ClasspathOptionsUtil.repl
compiler.console(classpathFiles, project.scalacOptions, classpathOptions, "", "", state.logger)(
val options = project.scalacOptions :+ "-Xnojline"
compiler.console(classpathFiles, options, classpathOptions, "", "", state.logger)(
Some(loader))
state
}
Expand Down

0 comments on commit 1500638

Please sign in to comment.