@@ -2,19 +2,14 @@ name := "compiler-benchmark"
22
33version := " 1.0-SNAPSHOT"
44
5- def scala212 = " 2.12.15"
6- def dottyLatest = " 0.25.0"
7- ThisBuild / scalaVersion := scala212
5+ def scala213 = " 2.13.16"
6+ ThisBuild / scalaVersion := scala213
87val JmhConfig = config(" jmh" )
98
109commands += Command .command(" testAll" ) { s =>
1110 " Test/compile" ::
1211 " compilation/test" ::
1312 " hot -psource=scalap -wi 1 -i 1 -f1" ::
14- s " ++ $dottyLatest" ::
15- " compilation/test" ::
16- " hot -psource=re2s -wi 1 -i 1 -f1" ::
17- s " ++ $scala212" ::
1813 " micro/Jmh/run -w1 -f1" ::
1914 s
2015}
@@ -53,15 +48,12 @@ lazy val compilation = addJmh(project).settings(
5348 // We should be able to switch this project to a broad range of Scala versions for comparative
5449 // benchmarking. As such, this project should only depend on the high level `MainClass` compiler API.
5550 description := " Black box benchmark of the compiler" ,
56- libraryDependencies += {
57- if (isDotty.value) " ch.epfl.lamp" %% " dotty-compiler" % scalaVersion.value
58- else scalaOrganization.value % " scala-compiler" % scalaVersion.value
59- },
60- crossScalaVersions := List (scala212, dottyLatest),
51+ libraryDependencies += scalaOrganization.value % " scala-compiler" % scalaVersion.value,
52+ crossScalaVersions := List (scala213),
6153 Compile / unmanagedSourceDirectories +=
62- (Compile / sourceDirectory).value / ( if (isDotty.value) " dotc " else " scalac" ) ,
54+ (Compile / sourceDirectory).value / " scalac" ,
6355 Jmh / run / mainClass := Some (" scala.bench.ScalacBenchmarkRunner" ),
64- libraryDependencies += " com.novocode " % " junit-interface" % " 0.11 " % Test ,
56+ libraryDependencies += " com.github.sbt " % " junit-interface" % " 0.13.2 " % Test ,
6557 Test / testOptions += Tests .Argument (TestFrameworks .JUnit ),
6658 Test / test / fork := true , // jmh scoped tasks run with fork := true.
6759).settings(addJavaOptions).dependsOn(infrastructure)
@@ -70,7 +62,7 @@ lazy val javaCompilation = addJmh(project).settings(
7062 description := " Black box benchmark of the java compiler" ,
7163 crossPaths := false ,
7264 Jmh / run / mainClass := Some (" scala.bench.ScalacBenchmarkRunner" ),
73- libraryDependencies += " com.novocode " % " junit-interface" % " 0.11 " % Test ,
65+ libraryDependencies += " com.github.sbt " % " junit-interface" % " 0.13.2 " % Test ,
7466 Test / testOptions += Tests .Argument (TestFrameworks .JUnit ),
7567 Test / test/ fork := true // jmh scoped tasks run with fork := true.
7668).settings(addJavaOptions).dependsOn(infrastructure)
@@ -101,14 +93,14 @@ lazy val addJavaOptions = javaOptions ++= {
10193 )
10294}
10395
104- addCommandAlias(" hot" , " compilation/jmh: run HotScalacBenchmark -foe true" )
96+ addCommandAlias(" hot" , " compilation/Jmh/ run HotScalacBenchmark -foe true" )
10597
106- addCommandAlias(" cold" , " compilation/jmh: run ColdScalacBenchmark -foe true" )
98+ addCommandAlias(" cold" , " compilation/Jmh/ run ColdScalacBenchmark -foe true" )
10799
108100commands ++= build.Profiler .commands
109101
110102// duplicated in project/build.sbt
111- val jmhV = System .getProperty(" jmh.version" , " 1.31 " )
103+ val jmhV = System .getProperty(" jmh.version" , " 1.37 " )
112104
113105def addJmh (project : Project ): Project = {
114106 // IntelliJ SBT project import doesn't like sbt-jmh's default setup, which results the prod and test
0 commit comments