By Alvin Alexander. Last updated: February 14, 2021
As a brief note, if you want to use the Scala 3 nightly build as your REPL, one way to do that is with this project I just put on Github. Just:
- Clone that project
cd
into its directory- Type
sbt
to start sbt - Type
console
to start a Scala 3 REPL inside sbt - Use the latest, greatest Scala syntax, as shown in this image:
The hack that makes this work is in the build.sbt file, and shown here in bold:
lazy val root = project .in(file(".")) .settings( name := "Scala3Nightly", description := "Lets me use the Scala 3 nightly build", version := "0.1.0", scalaVersion := dottyLatestNightlyBuild.get, useScala3doc := true, )
As shown in the build.sbt file, I found that scalaVersion
hack on this page: github.com/scala/scala3-example-project.
Sorry, I have to run off to a meeting now, but if you want to use the latest Scala 3 nightly build as your REPL, I hope this is helpful.
(Also, as shown in this gitter.im/dotty link, you can use Coursier for this purpose, but in this case it’s much easier to use this sbt hack to create a Scala 3 REPL with the latest nightly build, imho.)
this post is sponsored by my books: | |||
#1 New Release |
FP Best Seller |
Learn Scala 3 |
Learn FP Fast |