updates Circe to 0.13.0 (only for Scala 2.12 and 2.12)
downgrades typesafe config to 1.3.3, since this is the version that Akka HTTP uses
excludes scala-library from dependencies
upgrades Akka HTTP to 10.1.12
for Scala 2.13 dsql uses StringContext.checkLengths and StringContext.processEscapes, since sc.checkLengths and StringContext.treatEscapes are deprecated.
default Scala version is now 2.13
For Scala 2.12 and 2.13 there aren't any incompatibilities among library dependencies. For 2.11 there are minor info messages for scala-reflect and jawn-parser:
sbt:scruid> ++2.11.12 evicted
[info] Setting Scala version to 2.11.12 on 1 projects.
[info] Reapplying settings...
[info] Updating ...
[info] Done updating.
[info] Here are other dependency conflicts that were resolved:
[info] * org.scala-lang:scala-reflect:2.11.12 is selected over 2.11.11
[info] +- org.typelevel:machinist_2.11:0.6.6 (depends on 2.11.12)
[info] +- com.typesafe.scala-logging:scala-logging_2.11:3.9.2 (depends on 2.11.11)
[info] * org.typelevel:jawn-parser_2.11:0.14.2 is selected over 0.14.1
[info] +- org.mdedetrich:akka-stream-json_2.11:0.5.0 (depends on 0.14.2)
[info] +- io.circe:circe-jawn_2.11:0.11.1 () (depends on 0.14.1)
[success]
sbt:scruid> ++2.12.11 evicted
[info] Setting Scala version to 2.12.11 on 1 projects.
[info] Reapplying settings...
[info] Updating ...
[info] Done updating.
[success]
sbt:scruid> ++2.13.2 evicted
[info] Setting Scala version to 2.13.2 on 1 projects.
[info] Reapplying settings...
[info] Set current project to scruid (in build file:/Users/anskarl/work/Personal/dev/scruid/)
[info] Updating ...
[info] Done updating.
[success]
In Scala 2.13 Either is right-biased, therefore .right is deprecated:
[warn] src/main/scala/ing/wbaa/druid/client/DruidClient.scala:155:52: method right in class Either is deprecated (since 2.13.0): Either is now right-biased, use methods directly on Either
[warn] decode[List[DruidScanResults]](json).right
[warn] ^
[warn] src/main/scala/ing/wbaa/druid/client/DruidClient.scala:158:40: method right in class Either is deprecated (since 2.13.0): Either is now right-biased, use methods directly on Either
[warn] decode[List[Json]](json).right
[warn] ^
[warn] src/main/scala/ing/wbaa/druid/client/DruidClient.scala:161:47: method right in class Either is deprecated (since 2.13.0): Either is now right-biased, use methods directly on Either
[warn] decode[List[DruidResult]](json).right
To overcome this issue, I've added Scala-specific version of a helper function in ing.wbaa.druid.client.CirceDecoders that performs the desired map operation.
Specifically in Scala 2.11:
import io.circe.java8.time._
trait CirceDecoders extends JavaTimeDecoders {
protected def mapRightProjection[L, R, R1](either: Either[L,R])(f: R => R1): Either[L,R1] = either match {
case Right(value) => Right(f(value))
case _ => either.asInstanceOf[Either[L, R1]]
}
}
Similarly in Scala 2.12:
trait CirceDecoders {
protected def mapRightProjection[L, R, R1](either: Either[L,R])(f: R => R1): Either[L,R1] = either match {
case Right(value) => Right(f(value))
case _ => either.asInstanceOf[Either[L, R1]]
}
}
StringContext.checkLengths
andStringContext.processEscapes
, sincesc.checkLengths
andStringContext.treatEscapes
are deprecated.For Scala 2.12 and 2.13 there aren't any incompatibilities among library dependencies. For 2.11 there are minor info messages for
scala-reflect
andjawn-parser
:In Scala 2.13 Either is right-biased, therefore
.right
is deprecated:To overcome this issue, I've added Scala-specific version of a helper function in
ing.wbaa.druid.client.CirceDecoders
that performs the desired map operation.Specifically in Scala 2.11:
Similarly in Scala 2.12:
While in Scala 2.13 is simply: