Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scala 2.13.0 support for 2.0.x #354

Merged
merged 3 commits into from
Jun 15, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ matrix:
scala:
- 2.12.8
- 2.11.12
- 2.13.0-M5
- 2.13.0

script:
- sbt ++$TRAVIS_SCALA_VERSION 'testOnly -- xonly timefactor 5' mimaReportBinaryIssues validateCode doc
Expand Down
7 changes: 3 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import scalariform.formatter.preferences._

val scala211 = "2.11.12"
val scala212 = "2.12.8"
val scala213 = "2.13.0-M5"
val scala213 = "2.13.0"

resolvers ++= DefaultOptions.resolvers(snapshot = true)
resolvers in ThisBuild += Resolver.sonatypeRepo("public")
Expand Down Expand Up @@ -67,13 +67,12 @@ lazy val mimaSettings = mimaDefaultSettings ++ Seq(
mimaPreviousArtifacts := {
val VersionPattern = """^(\d+).(\d+).(\d+)(-.*)?""".r
val previousVersions = version.value match {
case VersionPattern("2", "0", "5", _) if scalaBinaryVersion.value == "2.13" => Set.empty // added 2.13.0 support in 2.0.5-SNAPSHOT.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best I could come up with. Don't be shy if you know of a better way.

case VersionPattern(epoch, major, minor, _) => (0 until minor.toInt).map(v => s"$epoch.$major.$v")
case _ => sys.error(s"Cannot find previous versions for ${version.value}")
}

val sbv = scalaBinaryVersion.value
if (sbv.equals(scala213)) Set.empty
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this since a comparison like "2.13".equals("2.13.0") would never be true.

else previousVersions.toSet.map(previousVersion => organization.value %% name.value % previousVersion)
previousVersions.toSet.map(previousVersion => organization.value %% name.value % previousVersion)
},
mimaBinaryIssueFilters ++= Seq(
ProblemFilters.exclude[MissingTypesProblem]("play.api.libs.ws.ahc.AhcWSClientConfig$"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ trait CurlFormat {
val encodedPassword = Base64.getUrlEncoder.encodeToString(s"$userName:$password".getBytes(StandardCharsets.US_ASCII))
b.append(s""" --header 'Authorization: Basic ${quote(encodedPassword)}'""")
b.append(" \\\n")
case _ => Unit
case _ => ()
}

// headers
Expand Down
10 changes: 5 additions & 5 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,29 @@ object Dependencies {

val scalaJava8Compat = Seq("org.scala-lang.modules" %% "scala-java8-compat" % "0.8.0")

val playJsonVersion = "2.7.2"
val playJsonVersion = "2.7.4"
val playJson = Seq("com.typesafe.play" %% "play-json" % playJsonVersion)

val slf4jApi = Seq("org.slf4j" % "slf4j-api" % "1.7.26")

val javaxInject = Seq("javax.inject" % "javax.inject" % "1")

val sslConfigVersion = "0.3.7"
val sslConfigVersion = "0.4.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure 0.4.0 and 0.3.7 are compatible. Maybe we will need to cut a release from 0.3.7 that supports Scala 2.13.

@dwijnand what do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible they are, but it's safer to try to crossbuild 0.3.7.

val sslConfigCore = Seq("com.typesafe" %% "ssl-config-core" % sslConfigVersion)

val scalaXmlVersion = "1.1.1"
val scalaXmlVersion = "1.2.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is scala-xml 1.2.0 binary compatible with 1.1.1? If not, then the best option is to add distinct versions depending on the Scala version used.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/scala/scala-xml/releases/tag/v1.2.0

This release is not backwards compatible with the last release of scala-xml, 1.1.1, because of the small change that removes the name field from transform.RewriteRule, see #129. It appears to have been an unused vestigial class member in a rarely used class, so it's likely of low risk.

val scalaXml = Seq("org.scala-lang.modules" %% "scala-xml" % scalaXmlVersion)

val signpostVersion = "1.2.1.2"
val oauth = Seq("oauth.signpost" % "signpost-core" % signpostVersion)

val cachecontrolVersion = "1.1.5"
val cachecontrolVersion = "1.1.7"
val cachecontrol = Seq("com.typesafe.play" %% "cachecontrol" % cachecontrolVersion)

val asyncHttpClientVersion = "2.6.0"
val asyncHttpClient = Seq("org.asynchttpclient" % "async-http-client" % asyncHttpClientVersion)

val akkaVersion = "2.5.21"
val akkaVersion = "2.5.23"
val akkaStreams = Seq("com.typesafe.akka" %% "akka-stream" % akkaVersion)
val akkaHttp = Seq("com.typesafe.akka" %% "akka-http" % "10.1.8")

Expand Down