Skip to content

Commit

Permalink
Merge pull request scala#100 from retronym/bump/sbt
Browse files Browse the repository at this point in the history
Bump SBT and sbt-dotty versions
  • Loading branch information
retronym committed Jan 21, 2020
2 parents c768aa2 + 0ad63a5 commit 83addd8
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
sudo: false
dist: trusty

language: scala

env:
Expand Down
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name := "compiler-benchmark"
version := "1.0-SNAPSHOT"

def scala212 = "2.12.8"
def dottyLatest = "0.8.0-RC1"
def dottyLatest = "0.21.0-RC1"
scalaVersion in ThisBuild := scala212
val JmhConfig = config("jmh")

Expand All @@ -13,7 +13,7 @@ commands += Command.command("testAll") { s =>
"hot -psource=scalap -wi 1 -i 1 -f1" ::
s"++$dottyLatest" ::
"compilation/test" ::
"hot -psource=vector -wi 1 -i 1 -f1" ::
"hot -psource=re2s -wi 1 -i 1 -f1" ::
s"++$scala212" ::
"micro/jmh:run -w1 -f1" ::
s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ trait BenchmarkDriver extends BaseBenchmarkDriver {
depsClasspath.mkString(File.pathSeparator))
}
ctx.setSetting(ctx.settings.migration, false)
ctx.setSetting(ctx.settings.outputDir, tempDir.getAbsolutePath)
ctx.setSetting(ctx.settings.outputDir, dotty.tools.io.AbstractFile.getDirectory(tempDir.getAbsolutePath))
ctx.setSetting(ctx.settings.language, List("Scala2"))
ctx.setSetting(ctx.settings.YdropComments, true)
val compiler = new dotty.tools.dotc.Compiler
val reporter = dotty.tools.dotc.Bench.doCompile(compiler, allArgs)
assert(!reporter.hasErrors)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import java.util.stream.Collectors
import com.typesafe.config.ConfigFactory

import scala.collection.JavaConverters._
import scala.collection.mutable.ListBuffer
import scala.io.Source
import scala.io.Codec

Expand Down Expand Up @@ -86,7 +87,7 @@ object BenchmarkUtils {
def initDeps(corpusSourcePath: Path): Seq[Path] = {
val depsDir = Paths.get(ConfigFactory.load.getString("deps.localdir"))
val depsFile = corpusSourcePath.resolve("deps.txt")
val depsClasspath = Seq.newBuilder[Path]
val depsClasspath = new ListBuffer[Path]
if (Files.exists(depsFile)) {
for (depUrlString <- Files.lines(depsFile).iterator().asScala) {
val depUrl = new URL(depUrlString)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.junit.Test
class BenchmarkTest {
@Test def compilesOK() = {
val bench = new ScalacBenchmark
bench.source = "../corpus/vector"
bench.source = "../corpus/re2s"
bench.corpusVersion = "latest"
bench.initTemp()
bench.compileImpl()
Expand Down
2 changes: 1 addition & 1 deletion corpus/re2s/a311ea0/java/util/regex/Parser.scala
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ class Parser(wholeRegexp: String, _flags: Int) {
case '*' | '+' | '?' =>
repeatPos = t.pos()
val op: Int =
t.pop match {
t.pop() match {
case '*' => ROP.STAR
case '+' => ROP.PLUS
case '?' => ROP.QUEST
Expand Down
3 changes: 2 additions & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sbt.version=1.1.5
sbt.version=1.3.7

Empty file added project/build.sbt
Empty file.
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ logLevel := Level.Warn
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.3.7")

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

0 comments on commit 83addd8

Please sign in to comment.