twitter / finagle

A fault tolerant, protocol-agnostic RPC system
https://twitter.github.io/finagle
Apache License 2.0
8.78k stars 1.45k forks source link

Scala 3 support #932

Open pjfanning opened 2 years ago

pjfanning commented 2 years ago

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 https://github.com/twitter/util/issues/274#issuecomment-1148594402

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.

ghost commented 2 years ago

scala 3 is good so far indeed

hartmut27 commented 2 years ago

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
xin301x commented 1 year ago

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。