- Clone that project
cdinto its directory
sbtto start sbt
consoleto 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.)