Skip to content

Commit 283b495

Browse files
committed
WIP
1 parent 51352a0 commit 283b495

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

compilation/src/main/scala/scala/tools/nsc/HotSbtBenchmark.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ class HotSbtBenchmark {
2525
@Param(value = Array(""))
2626
var extraArgs: String = _
2727

28+
@Param(value = Array("0.13.15"))
29+
var sbtVersion: String = _
30+
2831
// This parameter is set by ScalacBenchmarkRunner / UploadingRunner based on the Scala version.
2932
// When running the benchmark directly the "latest" symlink is used.
3033
@Param(value = Array("latest"))
@@ -60,7 +63,7 @@ class HotSbtBenchmark {
6063
scalaHome = Files.createTempDirectory("scalaHome-")
6164
initDepsClasspath()
6265
Files.createDirectory(tempDir.resolve("project"))
63-
Files.write(tempDir.resolve("project/build.properties"), java.util.Arrays.asList("sbt.version=0.13.15"))
66+
Files.write(tempDir.resolve("project/build.properties"), java.util.Arrays.asList("sbt.version=" + sbtVersion))
6467
Files.write(tempDir.resolve("build.sbt"), buildDef.getBytes("UTF-8"))
6568
val sbtLaucherPath = System.getProperty("sbt.launcher")
6669
if (sbtLaucherPath == null) sys.error("System property -Dsbt.launcher absent")
@@ -92,7 +95,7 @@ class HotSbtBenchmark {
9295
var read : Int = -1
9396
while (true) {
9497
read = processOutputReader.read(buffer)
95-
if (read == -1) sys.error("EOF")
98+
if (read == -1) sys.error("EOF: " + output.toString)
9699
else {
97100
output.append(buffer, 0, read)
98101
if (output.toString.contains("\n> ")) {

compilation/src/main/scala/scala/tools/nsc/ScalacBenchmark.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class ScalacBenchmark {
5050
new compiler.Run() compile command.files
5151
}
5252

53-
override def newCompiler(): Global = Global(settings, reporter)
53+
override def newCompiler(): Global = new Global(settings, reporter)
5454

5555
override protected def processSettingsHook(): Boolean = {
5656
if (source == "scala")

0 commit comments

Comments
 (0)