Skip to content

Commit

Permalink
Add Scala 2.13.0-RC1 support
Browse files Browse the repository at this point in the history
- upgrade Scala version from 2.13.0-M5 to 2.13.0-RC1 in `build.sbt` and `.travis.yml`

- upgrade scalatest version from 3.0.6-SNAP4 to 3.0.8-RC2
- upgrade stala-xml version from 1.1.1 to 1.2.0

Some fixes in tests were required:

- 's' and 'raw' string interpolators are now implemented as macros and macros are not instrumented; 's"Hello, $name"' expression was changed to explicit strings concatenation '"Hello, " + name' so the number of instrumented statements is the same in all Scala versions
see:
scala/scala@0cebcdf#diff-648e8f7f409d844c3c99b2d5a0d0dfe5R94
scala/scala#7779

- special symbol for all compilation phases was changed from "all" to "_"
see:
scala/scala@4d29431#diff-d686e8e67add4d42682f22193d20494bR1246
scala/scala#7908
  • Loading branch information
gslowikowski committed Apr 28, 2019
1 parent 9cf6357 commit 7ae649b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ scala:
- 2.10.7
- 2.11.12
- 2.12.8
- 2.13.0-M5
- 2.13.0-RC1

before_cache:
- find "$HOME/.sbt/" -name '*.lock' -print0 | xargs -0 rm
Expand Down
11 changes: 8 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import sbtcrossproject.CrossProject
import sbtcrossproject.CrossType

val Org = "org.scoverage"
val ScalatestVersion = "3.0.6-SNAP4"
val ScalatestVersion = "3.0.8-RC2"

val appSettings = Seq(
organization := Org,
scalaVersion := "2.12.8",
crossScalaVersions := Seq("2.10.7", "2.11.12", "2.12.8", "2.13.0-M5"),
crossScalaVersions := Seq("2.10.7", "2.11.12", "2.12.8", "2.13.0-RC1"),
fork in Test := false,
publishMavenStyle := true,
publishArtifact in Test := false,
Expand Down Expand Up @@ -43,6 +43,11 @@ val appSettings = Seq(
<name>Stephen Samuel</name>
<url>http://github.com/sksamuel</url>
</developer>
<developer>
<id>gslowikowski</id>
<name>Grzegorz Slowikowski</name>
<url>http://github.com/gslowikowski</url>
</developer>
</developers>
},
pomIncludeRepository := {
Expand Down Expand Up @@ -97,7 +102,7 @@ lazy val plugin = Project("scalac-scoverage-plugin", file("scalac-scoverage-plug
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, scalaMajor)) if scalaMajor > 10 =>
Seq("org.scala-lang.modules" %% "scala-xml" % "1.1.1")
Seq("org.scala-lang.modules" %% "scala-xml" % "1.2.0")
case _ =>
Seq()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PluginCoverageTest
compiler.compileCodeSnippet( """ object DefaultArgumentsObject {
| val defaultName = "world"
| def makeGreeting(name: String = defaultName): String = {
| s"Hello, $name"
| "Hello, " + name
| }
|} """.stripMargin)
assert(!compiler.reporter.hasErrors)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ object ScoverageCompiler {

def settings: Settings = {
val s = new scala.tools.nsc.Settings
s.Xprint.value = List("all")
s.Xprint.value = List("all", "_")
s.deprecation.value = true
s.Yrangepos.value = true
s.Yposdebug.value = true
Expand Down

0 comments on commit 7ae649b

Please sign in to comment.