How to use akka in Scala 3 ? I can't find akka dependencies while using scala 3
sbt errors :
[error] not found: /Users/admin/.ivy2/localcom.typesafe.akka/akka-actor-typed_3/2.6.15/ivys/ivy.xml
[error] not found: https://repo1.maven.org/maven2/com/typesafe/akka/akka-actor-typed_3/2.6.15/akka-actor-typed_3-2.6.15.pom
[error] (ssExtractDependencies) sbt.librarymanagement.ResolveException: Error downloading com.typesafe.akka:akka-actor-typed_3:2.6.15
[error] Not found
[error] Not found
[error] not found: /Users/admin/.ivy2/localcom.typesafe.akka/akka-actor-typed_3/2.6.15/ivys/ivy.xml
[error] not found: https://repo1.maven.org/maven2/com/typesafe/akka/akka-actor-typed_3/2.6.15/akka-actor-typed_3-2.6.15.pom
Akka has experimental support for Scala 3.
Akka is written in Scala, with language bindings provided for both Scala and Java. Akka's approach to handling concurrency is based on the Actor Model. In an actor-based system, everything is an actor, in much the same way that everything is an object in object-oriented design.
Akka is built with Scala, but offers both Scala and Java APIs to developers. At the heart of Akka is the concept of Actors, which provide an ideal model for thinking about highly concurrent and scalable systems. Writing concurrent systems using traditional low-level mechanism such as locks and threads is difficult.
Scala 3 introduced a bunch of language features like enums, extension methods, new context abstractions, type lambdas and a lot of niceties that make our life easier. The compiler is also different, faster and with backward compatibility between Scala 3 versions. Is Scala 3 production ready? Yes!
akka-actor-typed
is published for Scala 2.12, 2.13, not for Scala 3
https://mvnrepository.com/artifact/com.typesafe.akka/akka-actor-typed
Try compatibility mode
lazy val foo = project.in(file("foo"))
.settings(
scalaVersion := "3.0.0",
libraryDependencies +=
("com.typesafe.akka" %% "akka-actor-typed" % "2.6.15")
.cross(CrossVersion.for3Use2_13)
)
https://docs.scala-lang.org/scala3/guides/migration/compatibility-classpath.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With