From 6f0dfea693ba8beb509eeb5d06131acc332b7f6b Mon Sep 17 00:00:00 2001 From: Lars Hupel Date: Fri, 21 Oct 2016 18:19:21 +0200 Subject: [PATCH 1/3] Scala 2.12.0-RC2 --- .travis.yml | 14 +++++++++++--- build.sbt | 12 ++++++------ project/build.properties | 2 +- project/build.sbt | 2 +- .../shared/src/test/scala/sourcecode/Apply.scala | 5 ++++- .../src/test/scala/sourcecode/Implicits.scala | 5 ++++- 6 files changed, 27 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 87a63b0..c5dfff8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,15 @@ language: scala script: -- sbt ++$TRAVIS_SCALA_VERSION sourcecodeJVM/test:run sourcecodeJS/test:run + - sbt ++$TRAVIS_SCALA_VERSION sourcecodeJVM/test:run sourcecodeJS/test:run scala: - - 2.10.4 - - 2.11.7 + - 2.10.6 + - 2.11.8 + - 2.12.0-RC2 +jdk: + - openjdk7 + - oraclejdk8 +matrix: + exclude: + - scala: 2.12.0-RC2 + jdk: openjdk7 sudo: false diff --git a/build.sbt b/build.sbt index 18d83d9..0f29fe5 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,5 @@ -crossScalaVersions := Seq("2.10.4", "2.11.7") +crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.0-RC2") def macroDependencies(version: String) = Seq( @@ -7,20 +7,20 @@ def macroDependencies(version: String) = "org.scala-lang" % "scala-compiler" % version % "provided" ) ++ (if (version startsWith "2.10.") - Seq(compilerPlugin("org.scalamacros" % s"paradise" % "2.0.0" cross CrossVersion.full), - "org.scalamacros" %% s"quasiquotes" % "2.0.0") + Seq(compilerPlugin("org.scalamacros" % s"paradise" % "2.1.0" cross CrossVersion.full), + "org.scalamacros" %% s"quasiquotes" % "2.1.0") else Seq()) lazy val sourcecode = crossProject.settings( version := "0.1.2", - scalaVersion := "2.11.7", + scalaVersion := "2.11.8", name := "sourcecode" , organization := "com.lihaoyi", libraryDependencies ++= macroDependencies(scalaVersion.value), unmanagedSourceDirectories in Compile ++= { - if (scalaVersion.value startsWith "2.10.") Seq(baseDirectory.value / ".."/"shared"/"src"/ "main" / "scala-2.10") - else Seq(baseDirectory.value / ".."/"shared" / "src" / "main" / "scala-2.11") + if (scalaVersion.value startsWith "2.12.") Seq(baseDirectory.value / ".."/"shared"/"src"/ "main" / "scala-2.11") + else Seq() }, publishTo := Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2"), diff --git a/project/build.properties b/project/build.properties index 817bc38..35c88ba 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.9 +sbt.version=0.13.12 diff --git a/project/build.sbt b/project/build.sbt index 448bc06..bfdab78 100644 --- a/project/build.sbt +++ b/project/build.sbt @@ -1 +1 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.6") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.13") diff --git a/sourcecode/shared/src/test/scala/sourcecode/Apply.scala b/sourcecode/shared/src/test/scala/sourcecode/Apply.scala index ef52cd4..f07eb39 100644 --- a/sourcecode/shared/src/test/scala/sourcecode/Apply.scala +++ b/sourcecode/shared/src/test/scala/sourcecode/Apply.scala @@ -35,7 +35,10 @@ object Apply { assert(line == 34) val enclosing = sourcecode.Enclosing() - assert(enclosing == "sourcecode.Apply.applyRun myLazy$lzy Bar#enclosing") + assert( + (enclosing == "sourcecode.Apply.applyRun myLazy$lzy Bar#enclosing") || + (enclosing == "sourcecode.Apply.applyRun myLazy Bar#enclosing") // encoding changed in Scala 2.12 + ) } val b = new Bar{} } diff --git a/sourcecode/shared/src/test/scala/sourcecode/Implicits.scala b/sourcecode/shared/src/test/scala/sourcecode/Implicits.scala index 54ceef8..16cf7fc 100644 --- a/sourcecode/shared/src/test/scala/sourcecode/Implicits.scala +++ b/sourcecode/shared/src/test/scala/sourcecode/Implicits.scala @@ -35,7 +35,10 @@ object Implicits { assert(line.value == 34) val enclosing = implicitly[sourcecode.Enclosing] - assert(enclosing.value == "sourcecode.Implicits.implicitRun myLazy$lzy Bar#enclosing") + assert( + (enclosing.value == "sourcecode.Implicits.implicitRun myLazy$lzy Bar#enclosing") || + (enclosing.value == "sourcecode.Implicits.implicitRun myLazy Bar#enclosing") // encoding changed in Scala 2.12 + ) } val b = new Bar{} } From 1505decc081d51d03e75f386a1d5182078bf0cb5 Mon Sep 17 00:00:00 2001 From: Lars Hupel Date: Fri, 21 Oct 2016 19:29:10 +0200 Subject: [PATCH 2/3] 0.1.3 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 0f29fe5..a76d804 100644 --- a/build.sbt +++ b/build.sbt @@ -13,7 +13,7 @@ def macroDependencies(version: String) = Seq()) lazy val sourcecode = crossProject.settings( - version := "0.1.2", + version := "0.1.3", scalaVersion := "2.11.8", name := "sourcecode" , organization := "com.lihaoyi", From 56ac812f324577defc11d2e4c912682592f6b6e7 Mon Sep 17 00:00:00 2001 From: Lars Hupel Date: Mon, 31 Oct 2016 19:18:49 +0100 Subject: [PATCH 3/3] Scala 2.12.0 --- .travis.yml | 4 ++-- build.sbt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index c5dfff8..fff3df2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,12 +4,12 @@ script: scala: - 2.10.6 - 2.11.8 - - 2.12.0-RC2 + - 2.12.0 jdk: - openjdk7 - oraclejdk8 matrix: exclude: - - scala: 2.12.0-RC2 + - scala: 2.12.0 jdk: openjdk7 sudo: false diff --git a/build.sbt b/build.sbt index a76d804..815f653 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,5 @@ -crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.0-RC2") +crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.0") def macroDependencies(version: String) = Seq(