Skip to content

Commit

Permalink
Make Scala 3 the default target
Browse files Browse the repository at this point in the history
That way the default will always be the latest released version of
Scala.
  • Loading branch information
smarter committed May 19, 2021
1 parent f8fae1b commit b5feb32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/src/main/scala/com.olegych.scastie.api/Inputs.scala
Expand Up @@ -22,7 +22,7 @@ object Inputs {
def default: Inputs = Inputs(
_isWorksheetMode = true,
code = defaultCode,
target = ScalaTarget.Jvm.default,
target = ScalaTarget.Scala3.default,
libraries = Set(),
librariesFromList = List(),
sbtConfigExtra = """|scalacOptions ++= Seq(
Expand Down
Expand Up @@ -107,7 +107,7 @@ class SbtActorTest() extends TestKit(ActorSystem("SbtActorTest")) with ImplicitS
val message = "No Predef!"
val input = Inputs.default.copy(
sbtConfigExtra = "scalacOptions += \"-Yno-predef\" ",
code = s"""scala.Predef.println("$message")"""
code = s"""@main def Test = scala.Predef.println("$message")"""
)
// run(input)(_ => true)
// run(input.copy(sbtConfigExtra = input.sbtConfigExtra + "\nname := \"aaa\" "))(_ => true)
Expand Down Expand Up @@ -152,7 +152,7 @@ class SbtActorTest() extends TestKit(ActorSystem("SbtActorTest")) with ImplicitS

test("no warnings by default") {
val scala =
Inputs.default.copy(code = "println(1 + 1)", sbtConfigExtra = """scalacOptions ++= List("-Xlint", "-Xfatal-warnings")""")
Inputs.default.copy(code = "println(1 + 1)", sbtConfigExtra = """scalacOptions ++= List("-Xfatal-warnings")""")
run(scala)(assertUserOutput("2"))
}

Expand Down

0 comments on commit b5feb32

Please sign in to comment.