Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you start a Scala REPL in SBT when compilation is broken?

Tags:

scala

sbt

When your project doesn't compile, can you start a Scala REPL in SBT? using sbt console SBT seems to first compile the project and exit in this case. However the console could help experiment for solving the compilation trouble....

like image 695
matanster Avatar asked Sep 09 '14 08:09

matanster


People also ask

How do I start Scala REPL?

We can start Scala REPL by typing scala command in console/terminal.

Does sbt require Scala?

sbt needs Scala jars to run itself since it is written in Scala. sbt uses that same version of Scala to compile the build definitions that you write for your project because they use sbt APIs. This version of Scala is fixed for a specific sbt release and cannot be changed.

What is the difference between sbt and Scala?

If you call scala, you will get whatever scala version is installed on the path of your operating system. If you call sbt console, you get the scala version configured in the sbt build (build. sbt) with all libraries that are used in the build already on the classpath.


1 Answers

consoleQuick is an SBT task that starts a REPL with the same classpath as console but without forcing compilation. (It is described alongside similar tasks by the sbt tasks command).

like image 150
jsuereth Avatar answered Oct 05 '22 20:10

jsuereth