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....
We can start Scala REPL by typing scala command in console/terminal.
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.
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.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With