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

Binary incompatibility on Scala 3 #298

Open
cptwunderlich opened this issue Dec 30, 2024 · 0 comments
Open

Binary incompatibility on Scala 3 #298

cptwunderlich opened this issue Dec 30, 2024 · 0 comments

Comments

@cptwunderlich
Copy link

I get an error on Scala 3, as a result of a binary incompatibility of the 2.13 cross-version artifacts of akka in the library.
I only tested this with newer versions of Akka (2.9.x), but I don't see any changes to the Serializer trait. Here is the error message:

[info] ApiSpec:
[info] showcase.server.api.ApiSpec  ABORTED  (854 milliseconds)
[info]   java.lang.NoSuchMethodError: 'void akka.serialization.Serializer.$init$(akka.serialization.Serializer)'
[info]   at io.altoo.akka.serialization.kryo.KryoSerializer.<init>(KryoSerializer.scala:81)
[info]   at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
[info]   at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
[info]   at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
[info]   at akka.actor.ReflectiveDynamicAccess.createInstanceFor$$anonfun$1(ReflectiveDynamicAccess.scala:40)
[info]   at scala.util.Try$.apply(Try.scala:217)
[info]   at akka.actor.ReflectiveDynamicAccess.createInstanceFor(ReflectiveDynamicAccess.scala:44)
[info]   at akka.actor.ReflectiveDynamicAccess.createInstanceFor$$anonfun$2(ReflectiveDynamicAccess.scala:48)
[info]   at scala.util.Success.flatMap(Try.scala:266)
[info]   at akka.actor.ReflectiveDynamicAccess.createInstanceFor(ReflectiveDynamicAccess.scala:48)

This error is also mentioned in issue #291

The fix is quite simple: There are native Scala 3 artifacts for Akka 2.6.x on Sonatype maven.

I'll open a PR - I'd really appreciate a new release with this fix, as this is a hurdle in Scala 3 migration and it seems like other users might also be affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant