Skip to content

Commit 47a3750

Browse files
authored
Merge pull request #124 from lrytz/updates
version updates
2 parents 3f09f1c + f1ba865 commit 47a3750

File tree

7 files changed

+21
-31
lines changed

7 files changed

+21
-31
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,18 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
java: [8, 11, 17]
12+
java: [8, 21, 25]
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v5
1616
with:
1717
fetch-depth: 0
18-
- uses: coursier/cache-action@v6
19-
- uses: actions/setup-java@v2
18+
- name: Setup JDK
19+
uses: actions/setup-java@v5
2020
with:
2121
distribution: temurin
2222
java-version: ${{matrix.java}}
23+
cache: sbt
24+
- uses: sbt/setup-sbt@v1
2325
- name: Test
2426
run: sbt testAll

build.sbt

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,14 @@ name := "compiler-benchmark"
22

33
version := "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
87
val JmhConfig = config("jmh")
98

109
commands += 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

108100
commands ++= 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

113105
def addJmh(project: Project): Project = {
114106
// IntelliJ SBT project import doesn't like sbt-jmh's default setup, which results the prod and test

compilation/src/main/scala/scala/tools/nsc/ThreadCpuTimeProfiler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ static class NormTimeResult extends Result<NormTimeResult> {
8989
private final long ops;
9090

9191
public NormTimeResult(String prefix, long cycles, long instructions) {
92-
super(ResultRole.SECONDARY, Defaults.PREFIX + prefix, of(Double.NaN), "---", AggregationPolicy.AVG);
92+
super(ResultRole.SECONDARY, prefix, of(Double.NaN), "---", AggregationPolicy.AVG);
9393
this.prefix = prefix;
9494
this.scalar = cycles;
9595
this.ops = instructions;
@@ -111,7 +111,7 @@ public NormTimeResult aggregate(Collection<NormTimeResult> results) {
111111

112112
@Override
113113
protected Aggregator<NormTimeResult> getIterationAggregator() {
114-
NormTimeResultAggregator normTimeResultAggregator = new NormTimeResultAggregator(Defaults.PREFIX + prefix);
114+
NormTimeResultAggregator normTimeResultAggregator = new NormTimeResultAggregator(prefix);
115115
return (Aggregator<NormTimeResult>) (Object) normTimeResultAggregator;
116116
}
117117

corpus/scala/21d12e9/df29ebb

Lines changed: 0 additions & 1 deletion
This file was deleted.

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.8.2
1+
sbt.version=1.11.6

project/build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
val jmhV = System.getProperty("jmh.version", "1.31") // duplicated in build.sbt
1+
val jmhV = System.getProperty("jmh.version", "1.37") // duplicated in build.sbt
22

33
libraryDependencies ++= List(
44
"org.openjdk.jmh" % "jmh-core" % jmhV,

project/plugins.sbt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,4 @@
22
logLevel := Level.Warn
33

44
// sbt-jmh plugin - pulls in JMH dependencies too
5-
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")
6-
7-
// sbt-dotty plugin - to support `scalaVersion := "0.x"`
8-
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.2")
5+
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.7")

0 commit comments

Comments
 (0)