Skip to content

Commit 83addd8

Browse files
authored
Merge pull request #100 from retronym/bump/sbt
Bump SBT and sbt-dotty versions
2 parents c768aa2 + 0ad63a5 commit 83addd8

File tree

9 files changed

+14
-8
lines changed

9 files changed

+14
-8
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
sudo: false
2+
dist: trusty
3+
14
language: scala
25

36
env:

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name := "compiler-benchmark"
33
version := "1.0-SNAPSHOT"
44

55
def scala212 = "2.12.8"
6-
def dottyLatest = "0.8.0-RC1"
6+
def dottyLatest = "0.21.0-RC1"
77
scalaVersion in ThisBuild := scala212
88
val JmhConfig = config("jmh")
99

@@ -13,7 +13,7 @@ commands += Command.command("testAll") { s =>
1313
"hot -psource=scalap -wi 1 -i 1 -f1" ::
1414
s"++$dottyLatest" ::
1515
"compilation/test" ::
16-
"hot -psource=vector -wi 1 -i 1 -f1" ::
16+
"hot -psource=re2s -wi 1 -i 1 -f1" ::
1717
s"++$scala212" ::
1818
"micro/jmh:run -w1 -f1" ::
1919
s

compilation/src/main/dotc/scala/tools/benchmark/BenchmarkDriver.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ trait BenchmarkDriver extends BaseBenchmarkDriver {
1313
depsClasspath.mkString(File.pathSeparator))
1414
}
1515
ctx.setSetting(ctx.settings.migration, false)
16-
ctx.setSetting(ctx.settings.outputDir, tempDir.getAbsolutePath)
16+
ctx.setSetting(ctx.settings.outputDir, dotty.tools.io.AbstractFile.getDirectory(tempDir.getAbsolutePath))
1717
ctx.setSetting(ctx.settings.language, List("Scala2"))
18+
ctx.setSetting(ctx.settings.YdropComments, true)
1819
val compiler = new dotty.tools.dotc.Compiler
1920
val reporter = dotty.tools.dotc.Bench.doCompile(compiler, allArgs)
2021
assert(!reporter.hasErrors)

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import java.util.stream.Collectors
99
import com.typesafe.config.ConfigFactory
1010

1111
import scala.collection.JavaConverters._
12+
import scala.collection.mutable.ListBuffer
1213
import scala.io.Source
1314
import scala.io.Codec
1415

@@ -86,7 +87,7 @@ object BenchmarkUtils {
8687
def initDeps(corpusSourcePath: Path): Seq[Path] = {
8788
val depsDir = Paths.get(ConfigFactory.load.getString("deps.localdir"))
8889
val depsFile = corpusSourcePath.resolve("deps.txt")
89-
val depsClasspath = Seq.newBuilder[Path]
90+
val depsClasspath = new ListBuffer[Path]
9091
if (Files.exists(depsFile)) {
9192
for (depUrlString <- Files.lines(depsFile).iterator().asScala) {
9293
val depUrl = new URL(depUrlString)

compilation/src/test/scala/scala/tools/benchmark/BenchmarkTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import org.junit.Test
66
class BenchmarkTest {
77
@Test def compilesOK() = {
88
val bench = new ScalacBenchmark
9-
bench.source = "../corpus/vector"
9+
bench.source = "../corpus/re2s"
1010
bench.corpusVersion = "latest"
1111
bench.initTemp()
1212
bench.compileImpl()

corpus/re2s/a311ea0/java/util/regex/Parser.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ class Parser(wholeRegexp: String, _flags: Int) {
733733
case '*' | '+' | '?' =>
734734
repeatPos = t.pos()
735735
val op: Int =
736-
t.pop match {
736+
t.pop() match {
737737
case '*' => ROP.STAR
738738
case '+' => ROP.PLUS
739739
case '?' => ROP.QUEST

project/build.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
sbt.version=1.1.5
1+
sbt.version=1.3.7
2+

project/build.sbt

Whitespace-only changes.

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ logLevel := Level.Warn
55
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.3.7")
66

77
// sbt-dotty plugin - to support `scalaVersion := "0.x"`
8-
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.2.2")
8+
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.3.4")

0 commit comments

Comments
 (0)