twitter / finagle

A fault tolerant, protocol-agnostic RPC system

Home Page:https://twitter.github.io/finagle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scala 3 support

pjfanning opened this issue · comments

Is your feature request related to a problem? Please describe.

I'm not really a Finagle user but maintain jackson-module-scala. Finagle does not yet support Scala 3 but many of its dependencies do. I'm just opening this issue for discussion purposes.

A few twitter util jars are not supported - see twitter/util#274 (comment)

For Scala 3, this class will need to change to use jackson-module-scala ClassTagExtensions instead of ScalaObjectMapper.

https://github.com/twitter/finagle/blob/develop/finagle-mysql/src/main/scala/com/twitter/finagle/mysql/Value.scala

In theory, you could keep using ScalaObjectMapper for Scala 2 builds. This class is deprecated but there are no plans to remove it from jackson-module-scala 2.x (but it will probably not be part of jackson-module-scala 3.x - the v3.x release is not yet planned and is not worth worrying about yet).

Describe the solution you'd like

Generally, it would be nice to get everyone onto Scala 3.

scala 3 is good so far indeed

a cross compile works with Finagle and Scala 3, with the help of ... CrossVersion.for3Use2_13.

build.sbt:

libraryDependencies += "com.twitter" %% "util-core" % "22.12.0" cross CrossVersion.for3Use2_13,
libraryDependencies += "com.twitter" %% "finagle-http" % "22.12.0" cross CrossVersion.for3Use2_13,
libraryDependencies += "com.twitter" %% "finagle-core" % "22.12.0" cross CrossVersion.for3Use2_13,

to identify all transitive dependencies and their versions, this can help

$ sbt dependencyTree