Skip to content

Commit b5feb32

Browse files
committed
Make Scala 3 the default target
That way the default will always be the latest released version of Scala.
1 parent f8fae1b commit b5feb32

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

api/src/main/scala/com.olegych.scastie.api/Inputs.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ object Inputs {
2222
def default: Inputs = Inputs(
2323
_isWorksheetMode = true,
2424
code = defaultCode,
25-
target = ScalaTarget.Jvm.default,
25+
target = ScalaTarget.Scala3.default,
2626
libraries = Set(),
2727
librariesFromList = List(),
2828
sbtConfigExtra = """|scalacOptions ++= Seq(

sbt-runner/src/test/scala/com.olegych.scastie.sbt/SbtActorTest.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class SbtActorTest() extends TestKit(ActorSystem("SbtActorTest")) with ImplicitS
107107
val message = "No Predef!"
108108
val input = Inputs.default.copy(
109109
sbtConfigExtra = "scalacOptions += \"-Yno-predef\" ",
110-
code = s"""scala.Predef.println("$message")"""
110+
code = s"""@main def Test = scala.Predef.println("$message")"""
111111
)
112112
// run(input)(_ => true)
113113
// run(input.copy(sbtConfigExtra = input.sbtConfigExtra + "\nname := \"aaa\" "))(_ => true)
@@ -152,7 +152,7 @@ class SbtActorTest() extends TestKit(ActorSystem("SbtActorTest")) with ImplicitS
152152

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

0 commit comments

Comments
 (0)