-
Notifications
You must be signed in to change notification settings - Fork 135
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
Compile fails in scala 3 with implicit errors for circe #642
Comments
Akka does not yet support Scala 3. |
It does now, although akka-http is still lagging in this department, iirc. |
My workaround for this issue was to use crosscompiled Akka together with circe for Scala 3. Here is my minimal sbt config: val circeVersion = "0.14.1"
val akkaVersion = "2.6.18"
val akkaHttpVersion = "10.2.7"
val akkaHttpCirceVersion = "1.39.2"
lazy val circeCore = "io.circe" %% "circe-core" % circeVersion
lazy val circeGeneric = "io.circe" %% "circe-generic" % circeVersion
lazy val circeParser = "io.circe" %% "circe-parser" % circeVersion
lazy val akkaStream = "com.typesafe.akka" %% "akka-stream" % akkaVersion
lazy val akkaHttp = "com.typesafe.akka" %% "akka-http" % akkaHttpVersion
lazy val akkaHttpCirce = "de.heikoseeberger" %% "akka-http-circe" % akkaHttpCirceVersion
lazy val scala3cross2 = project
.settings(
scalaVersion := "3.1.0",
libraryDependencies ++= List(
circeCore,
circeGeneric,
circeParser
) ++ List(
akkaStream,
akkaHttp,
akkaHttpCirce
).map(
_.cross(CrossVersion.for3Use2_13)
),
conflictWarning := ConflictWarning.disable
) Now you can use Scala 3 circe syntax for codecs on case classes: import io.circe.Codec
case class Example(value: String) derives Codec.AsObject This setup works exactly like using |
this passes
but this fails
with error
My guess is that using circe in scala3, caused some drift with akka-http-json
The text was updated successfully, but these errors were encountered: