@@ -2,19 +2,14 @@ name := "compiler-benchmark"
2
2
3
3
version := " 1.0-SNAPSHOT"
4
4
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
8
7
val JmhConfig = config(" jmh" )
9
8
10
9
commands += Command .command(" testAll" ) { s =>
11
10
" Test/compile" ::
12
11
" compilation/test" ::
13
12
" 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" ::
18
13
" micro/Jmh/run -w1 -f1" ::
19
14
s
20
15
}
@@ -53,15 +48,12 @@ lazy val compilation = addJmh(project).settings(
53
48
// We should be able to switch this project to a broad range of Scala versions for comparative
54
49
// benchmarking. As such, this project should only depend on the high level `MainClass` compiler API.
55
50
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),
61
53
Compile / unmanagedSourceDirectories +=
62
- (Compile / sourceDirectory).value / ( if (isDotty.value) " dotc " else " scalac" ) ,
54
+ (Compile / sourceDirectory).value / " scalac" ,
63
55
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 ,
65
57
Test / testOptions += Tests .Argument (TestFrameworks .JUnit ),
66
58
Test / test / fork := true , // jmh scoped tasks run with fork := true.
67
59
).settings(addJavaOptions).dependsOn(infrastructure)
@@ -70,7 +62,7 @@ lazy val javaCompilation = addJmh(project).settings(
70
62
description := " Black box benchmark of the java compiler" ,
71
63
crossPaths := false ,
72
64
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 ,
74
66
Test / testOptions += Tests .Argument (TestFrameworks .JUnit ),
75
67
Test / test/ fork := true // jmh scoped tasks run with fork := true.
76
68
).settings(addJavaOptions).dependsOn(infrastructure)
@@ -101,14 +93,14 @@ lazy val addJavaOptions = javaOptions ++= {
101
93
)
102
94
}
103
95
104
- addCommandAlias(" hot" , " compilation/jmh: run HotScalacBenchmark -foe true" )
96
+ addCommandAlias(" hot" , " compilation/Jmh/ run HotScalacBenchmark -foe true" )
105
97
106
- addCommandAlias(" cold" , " compilation/jmh: run ColdScalacBenchmark -foe true" )
98
+ addCommandAlias(" cold" , " compilation/Jmh/ run ColdScalacBenchmark -foe true" )
107
99
108
100
commands ++= build.Profiler .commands
109
101
110
102
// duplicated in project/build.sbt
111
- val jmhV = System .getProperty(" jmh.version" , " 1.31 " )
103
+ val jmhV = System .getProperty(" jmh.version" , " 1.37 " )
112
104
113
105
def addJmh (project : Project ): Project = {
114
106
// IntelliJ SBT project import doesn't like sbt-jmh's default setup, which results the prod and test
0 commit comments