diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a336db364..23e7f533d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -84,7 +84,7 @@ You can install a pre-commit hook with `bin/hooks.sh` ``` . ├── api | autowire api (rpc server <=> browser) -│ | models for server <=> sbt (akka-remote) +│ | models for server <=> sbt (pekko-remote) ├── balancer | distribute load based on sbt configuration ├── bin | scalfmt runner ├── build.sbt | build definition @@ -110,7 +110,7 @@ You can install a pre-commit hook with `bin/hooks.sh` Scala.js Client run/save/format +-------------------------------------------+ +---------------------+ AutowireApi +---------------------+ +-------------------------------------------+| - | ScastieBackend | (HTTP) | +------------+ | akka+remote +-------------------------------------------+|| + | ScastieBackend | (HTTP) | +------------+ | pekko+remote +-------------------------------------------+|| | +--------+ +-----------------> | |LoadBalancer| <------------------+ | SbtActor Sbt(Process) ||| | | | | | +------------+ | | | +----------+ +-----------+ ||| | | | | | | +---> | | <-------> |sbt|scastie| ||+ @@ -120,7 +120,7 @@ You can install a pre-commit hook with `bin/hooks.sh` | | | | | | | | | | | | +-------------------------------------------+ | | | | | SnippetContainer(DB)| +-------------------------------------------+| - | | | | | | akka+remote +-------------------------------------------+|| + | | | | | | pekko+remote +-------------------------------------------+|| | | | | <-----------------+ oauth | <-----------+ | ScalaCliActor ScalaCli(Bsp) ||| | +--------+ | SnippetProgress | static ressources | | | +----------+ +-----------+ ||| | | (sse/websocket) +---------------------+ +---> | | <-------> |scala-cli | ||+ diff --git a/balancer/src/main/resources/reference.conf b/balancer/src/main/resources/reference.conf index 6326aabda..fb344b326 100644 --- a/balancer/src/main/resources/reference.conf +++ b/balancer/src/main/resources/reference.conf @@ -12,4 +12,4 @@ org.scastie.balancer { remote-scli-ports-size = 1 } -akka.actor.warn-about-java-serializer-usage = false +pekko.actor.warn-about-java-serializer-usage = false diff --git a/balancer/src/main/scala/org/scastie/balancer/BaseDispatcher.scala b/balancer/src/main/scala/org/scastie/balancer/BaseDispatcher.scala index c6580cc68..34d4384df 100644 --- a/balancer/src/main/scala/org/scastie/balancer/BaseDispatcher.scala +++ b/balancer/src/main/scala/org/scastie/balancer/BaseDispatcher.scala @@ -1,14 +1,14 @@ package org.scastie.balancer import com.typesafe.config.Config -import akka.actor.ActorSelection +import org.apache.pekko.actor.ActorSelection import org.scastie.api.ActorConnected -import akka.actor.ActorLogging -import akka.actor.Actor -import akka.actor.ActorRef +import org.apache.pekko.actor.ActorLogging +import org.apache.pekko.actor.Actor +import org.apache.pekko.actor.ActorRef import scala.concurrent.Future -import akka.pattern.ask -import akka.util.Timeout +import org.apache.pekko.pattern.ask +import org.apache.pekko.util.Timeout import scala.concurrent.duration._ import org.scastie.api.RunnerPing import scala.collection.concurrent.TrieMap @@ -39,7 +39,7 @@ abstract class BaseDispatcher[R, S](config: Config) extends Actor with ActorLogg runnerName: String, runnerAddress: SocketAddress, actorName: String - ) = s"akka://$runnerName@${runnerAddress.host}:${runnerAddress.port}/user/$actorName" + ) = s"pekko://$runnerName@${runnerAddress.host}:${runnerAddress.port}/user/$actorName" def connectRunner(path: String): ActorSelection = { val selection = context.actorSelection(path) diff --git a/balancer/src/main/scala/org/scastie/balancer/DispatchActor.scala b/balancer/src/main/scala/org/scastie/balancer/DispatchActor.scala index 73f887f4b..975300f93 100644 --- a/balancer/src/main/scala/org/scastie/balancer/DispatchActor.scala +++ b/balancer/src/main/scala/org/scastie/balancer/DispatchActor.scala @@ -1,16 +1,16 @@ package org.scastie.balancer -import akka.actor.Actor -import akka.actor.ActorLogging -import akka.actor.ActorRef -import akka.actor.ActorSelection -import akka.actor.OneForOneStrategy -import akka.actor.SupervisorStrategy -import akka.actor.Props -import akka.event -import akka.pattern.ask -import akka.remote.DisassociatedEvent -import akka.util.Timeout +import org.apache.pekko.actor.Actor +import org.apache.pekko.actor.ActorLogging +import org.apache.pekko.actor.ActorRef +import org.apache.pekko.actor.ActorSelection +import org.apache.pekko.actor.OneForOneStrategy +import org.apache.pekko.actor.SupervisorStrategy +import org.apache.pekko.actor.Props +import org.apache.pekko.event +import org.apache.pekko.pattern.ask +import org.apache.pekko.remote.DisassociatedEvent +import org.apache.pekko.util.Timeout import org.scastie.api._ import org.scastie.storage._ import org.scastie.storage.filesystem._ diff --git a/balancer/src/main/scala/org/scastie/balancer/ProgressActor.scala b/balancer/src/main/scala/org/scastie/balancer/ProgressActor.scala index 85b187c1c..69e47f238 100644 --- a/balancer/src/main/scala/org/scastie/balancer/ProgressActor.scala +++ b/balancer/src/main/scala/org/scastie/balancer/ProgressActor.scala @@ -1,8 +1,8 @@ package org.scastie.balancer -import akka.NotUsed -import akka.actor.{Actor, ActorRef} -import akka.stream.scaladsl.Source +import org.apache.pekko.NotUsed +import org.apache.pekko.actor.{Actor, ActorRef} +import org.apache.pekko.stream.scaladsl.Source import org.scastie.api._ import org.scastie.util.GraphStageForwarder diff --git a/balancer/src/main/scala/org/scastie/balancer/SbtDispatcher.scala b/balancer/src/main/scala/org/scastie/balancer/SbtDispatcher.scala index 8b668d7fc..bb2b5fa37 100644 --- a/balancer/src/main/scala/org/scastie/balancer/SbtDispatcher.scala +++ b/balancer/src/main/scala/org/scastie/balancer/SbtDispatcher.scala @@ -1,25 +1,25 @@ package org.scastie.balancer -import akka.event -import akka.actor.Actor -import akka.actor.ActorRef +import org.apache.pekko.event +import org.apache.pekko.actor.Actor +import org.apache.pekko.actor.ActorRef import com.typesafe.config.Config -import akka.actor.ActorLogging +import org.apache.pekko.actor.ActorLogging import com.typesafe.config.ConfigFactory -import akka.actor.ActorSelection +import org.apache.pekko.actor.ActorSelection import org.scastie.api._ import org.scastie.util._ import scala.concurrent.Future -import akka.remote.DisassociatedEvent +import org.apache.pekko.remote.DisassociatedEvent import java.time.Instant import scala.concurrent._ -import akka.pattern.ask +import org.apache.pekko.pattern.ask import scala.concurrent.duration._ import java.util.concurrent.Executors -import akka.actor.Address -import akka.actor.ActorSystem -import akka.util.Timeout +import org.apache.pekko.actor.Address +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.util.Timeout import java.util.concurrent.atomic.AtomicReference class SbtDispatcher(config: Config, progressActor: ActorRef, statusActor: ActorRef) @@ -118,13 +118,13 @@ class SbtDispatcher(config: Config, progressActor: ActorRef, statusActor: ActorR case Replay(SbtRun(snippetId, inputs, progressActor, snippetActor)) => log.info("Replay: " + inputs.code) - case RunnerConnect(runnerHostname, runnerAkkaPort) => - if (!remoteSbtSelections.contains(SocketAddress(runnerHostname, runnerAkkaPort))) { - log.info("Connected Runner {}", runnerAkkaPort) + case RunnerConnect(runnerHostname, runnerPekkoPort) => + if (!remoteSbtSelections.contains(SocketAddress(runnerHostname, runnerPekkoPort))) { + log.info("Connected Runner {}", runnerPekkoPort) - val address = SocketAddress(runnerHostname, runnerAkkaPort) + val address = SocketAddress(runnerHostname, runnerPekkoPort) val ref = connectRunner(getRemoteActorPath("SbtRunner", address, "SbtActor")) - val sel = SocketAddress(runnerHostname, runnerAkkaPort) -> ref + val sel = SocketAddress(runnerHostname, runnerPekkoPort) -> ref remoteSbtSelections.addOne(sel) diff --git a/balancer/src/main/scala/org/scastie/balancer/ScalaCliDispatcher.scala b/balancer/src/main/scala/org/scastie/balancer/ScalaCliDispatcher.scala index 3d469d084..d4041cd97 100644 --- a/balancer/src/main/scala/org/scastie/balancer/ScalaCliDispatcher.scala +++ b/balancer/src/main/scala/org/scastie/balancer/ScalaCliDispatcher.scala @@ -1,19 +1,19 @@ package org.scastie.balancer -import akka.actor.Actor -import akka.actor.ActorLogging +import org.apache.pekko.actor.Actor +import org.apache.pekko.actor.ActorLogging import com.typesafe.config.Config -import akka.actor.ActorRef -import akka.actor.ActorSelection +import org.apache.pekko.actor.ActorRef +import org.apache.pekko.actor.ActorSelection import java.time.Instant import scala.collection.immutable.Queue import org.scastie.util.SbtTask import org.scastie.util.ScalaCliTask import org.scastie.api._ -import akka.util.Timeout +import org.apache.pekko.util.Timeout import scala.concurrent.duration._ -import akka.pattern.ask -import akka.remote.DisassociatedEvent +import org.apache.pekko.pattern.ask +import org.apache.pekko.remote.DisassociatedEvent import java.util.concurrent.ConcurrentLinkedQueue import scala.jdk.CollectionConverters._ import scala.collection.concurrent.TrieMap @@ -72,11 +72,11 @@ class ScalaCliDispatcher(config: Config, progressActor: ActorRef, statusActor: A val sender = this.sender() ping(remoteServers.values.toList).andThen(s => sender ! RunnerPong) - case RunnerConnect(runnerHostname, runnerAkkaPort) => - if (!remoteServers.contains(SocketAddress(runnerHostname, runnerAkkaPort))) { - log.info("Connected runner {}", runnerAkkaPort) + case RunnerConnect(runnerHostname, runnerPekkoPort) => + if (!remoteServers.contains(SocketAddress(runnerHostname, runnerPekkoPort))) { + log.info("Connected runner {}", runnerPekkoPort) - val address = SocketAddress(runnerHostname, runnerAkkaPort) + val address = SocketAddress(runnerHostname, runnerPekkoPort) val ref = connectRunner(getRemoteActorPath("ScalaCliRunner", address, "ScalaCliActor")) remoteServers.addOne(address -> ref) diff --git a/balancer/src/main/scala/org/scastie/balancer/StatusActor.scala b/balancer/src/main/scala/org/scastie/balancer/StatusActor.scala index 76e8aed8f..e6129184d 100644 --- a/balancer/src/main/scala/org/scastie/balancer/StatusActor.scala +++ b/balancer/src/main/scala/org/scastie/balancer/StatusActor.scala @@ -2,15 +2,15 @@ package org.scastie.balancer import org.scastie.api._ -import akka.actor.{Actor, ActorLogging, ActorRef, Props} -import akka.stream.scaladsl.Source +import org.apache.pekko.actor.{Actor, ActorLogging, ActorRef, Props} +import org.apache.pekko.stream.scaladsl.Source import java.util.concurrent.TimeUnit import scala.collection.mutable import scala.concurrent.duration._ import org.scastie.util.GraphStageForwarder -import akka.actor.Terminated +import org.apache.pekko.actor.Terminated case object SubscribeStatus diff --git a/balancer/src/main/scala/org/scastie/balancer/package.scala b/balancer/src/main/scala/org/scastie/balancer/package.scala index dfa6c051d..7b58698f2 100644 --- a/balancer/src/main/scala/org/scastie/balancer/package.scala +++ b/balancer/src/main/scala/org/scastie/balancer/package.scala @@ -1,6 +1,6 @@ package org.scastie -import akka.actor.ActorSelection +import org.apache.pekko.actor.ActorSelection import org.scastie.api.{SbtInputs, ScalaCliInputs, ServerState} package object balancer { diff --git a/balancer/src/test/resources/application.conf b/balancer/src/test/resources/application.conf index 08c9f063e..1fe375d42 100644 --- a/balancer/src/test/resources/application.conf +++ b/balancer/src/test/resources/application.conf @@ -2,4 +2,4 @@ org.scastie.balancer { snippets-storage = files } -akka.actor.provider = akka.actor.LocalActorRefProvider +pekko.actor.provider = org.apache.pekko.actor.LocalActorRefProvider diff --git a/balancer/src/test/scala/org/scastie/balancer/DispatchActorIntegrationTest.scala b/balancer/src/test/scala/org/scastie/balancer/DispatchActorIntegrationTest.scala index 06b9bac89..42582586d 100644 --- a/balancer/src/test/scala/org/scastie/balancer/DispatchActorIntegrationTest.scala +++ b/balancer/src/test/scala/org/scastie/balancer/DispatchActorIntegrationTest.scala @@ -1,9 +1,9 @@ package org.scastie.balancer -import akka.actor.{ActorSystem, Props} -import akka.pattern.ask -import akka.testkit.{ImplicitSender, TestKit, TestProbe} -import akka.util.Timeout +import org.apache.pekko.actor.{ActorSystem, Props} +import org.apache.pekko.pattern.ask +import org.apache.pekko.testkit.{ImplicitSender, TestKit, TestProbe} +import org.apache.pekko.util.Timeout import org.scastie.api._ import org.scastie.sbt._ import org.scastie.scalacli._ @@ -76,16 +76,16 @@ class DispatchActorIntegrationTest() waitFor(sid3, ret)(_.isDone) } - private val serverAkkaPort = 15000 - private val webSystem = ActorSystem("Web", RemotePortConfig(serverAkkaPort)) + private val serverRemotePort = 15000 + private val webSystem = ActorSystem("Web", RemotePortConfig(serverRemotePort)) - private val sbtAkkaPort = 5150 + private val sbtRemotePort = 5150 private val sbtSystem = - ActorSystem("SbtRunner", RemotePortConfig(sbtAkkaPort)) + ActorSystem("SbtRunner", RemotePortConfig(sbtRemotePort)) - private val scalaCliAkkaPort = 5250 + private val scalaCliRemotePort = 5250 private val scalaCliSystem = - ActorSystem("ScalaCliRunner", RemotePortConfig(scalaCliAkkaPort)) + ActorSystem("ScalaCliRunner", RemotePortConfig(scalaCliRemotePort)) private val progressActor = TestProbe() private val statusActor = TestProbe() @@ -105,9 +105,9 @@ class DispatchActorIntegrationTest() reconnectInfo = Some( ReconnectInfo( serverHostname = localhost, - serverAkkaPort = serverAkkaPort, + serverRemotePort = serverRemotePort, actorHostname = localhost, - actorAkkaPort = sbtAkkaPort + actorRemotePort = sbtRemotePort ) ) ) @@ -136,9 +136,9 @@ class DispatchActorIntegrationTest() reconnectInfo = Some( ReconnectInfo( serverHostname = localhost, - serverAkkaPort = serverAkkaPort, + serverRemotePort = serverRemotePort, actorHostname = localhost, - actorAkkaPort = scalaCliAkkaPort + actorRemotePort = scalaCliRemotePort ) ) ) @@ -210,7 +210,7 @@ class DispatchActorIntegrationTest() object RemotePortConfig { def apply(port: Int): Config = ConfigFactory.parseString( - s"""|akka { + s"""|pekko { | actor { | provider = cluster | allow-java-serialization = on diff --git a/build.sbt b/build.sbt index 857c0adf5..55309e5ae 100644 --- a/build.sbt +++ b/build.sbt @@ -5,9 +5,10 @@ import com.typesafe.sbt.SbtNativePackager.Universal import org.scalajs.linker.interface.ModuleSplitStyle import SbtShared._ -def akka(module: String) = "com.typesafe.akka" %% ("akka-" + module) % "2.6.19" +def pekko(module: String) = "org.apache.pekko" %% ("pekko-" + module) % pekkoVersion -val akkaHttpVersion = "10.2.9" +val pekkoHttpVersion = "1.3.0" +val pekkoVersion = "1.4.0" addCommandAlias("startAll", "scalaCliRunner/reStart;sbtRunner/reStart;server/reStart;metalsRunner/reStart;client/fastLinkJS") addCommandAlias("startAllProd", "scalaCliRunner/reStart;sbtRunner/reStart;metalsRunner/reStart;server/buildTreesitterWasm;server/fullLinkJS/reStart") @@ -66,12 +67,11 @@ lazy val utils = project .settings( resolvers += Resolver.typesafeRepo("releases"), libraryDependencies ++= Seq( - akka("protobuf"), - akka("stream"), - akka("actor"), - akka("remote"), - akka("slf4j"), - akka("testkit") % Test + pekko("stream"), + pekko("actor"), + pekko("remote"), + pekko("slf4j"), + pekko("testkit") % Test ) ) .dependsOn(api.jvm(ScalaVersions.jvm)) @@ -158,10 +158,10 @@ lazy val sbtRunner = project reStart := reStart.dependsOn(runnerRuntimeDependencies: _*).evaluated, resolvers ++= Resolver.sonatypeOssRepos("public"), libraryDependencies ++= Seq( - akka("actor"), - akka("testkit") % Test, - akka("cluster"), - akka("slf4j"), + pekko("actor"), + pekko("testkit") % Test, + pekko("cluster"), + pekko("slf4j"), "com.github.cb372" %% "scalacache-core" % "0.28.0", "com.github.cb372" %% "scalacache-guava" % "0.28.0", "org.scalameta" %% "scalafmt-core" % "3.9.2", @@ -269,15 +269,15 @@ lazy val server = project Seq(outputWasmDirectory / treeSitterScalaOutputName, outputWasmDirectory / treeSitterOutputName) }, libraryDependencies ++= Seq( - "org.apache.commons" % "commons-text" % "1.11.0", - "com.typesafe.akka" %% "akka-http" % akkaHttpVersion, - "com.softwaremill.akka-http-session" %% "core" % "0.7.1", - "ch.megard" %% "akka-http-cors" % "1.2.0", - "de.heikoseeberger" %% "akka-http-circe" % "1.39.2", - akka("cluster"), - akka("slf4j"), - akka("testkit") % Test, - "com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % Test + "org.apache.commons" % "commons-text" % "1.11.0", + "org.apache.pekko" %% "pekko-http" % pekkoHttpVersion, + "com.softwaremill.pekko-http-session" %% "core" % "0.7.1", + "org.apache.pekko" %% "pekko-http-cors" % "1.3.0", + pekko("cluster"), + pekko("slf4j"), + pekko("testkit") % Test, + "com.github.pjfanning" %% "pekko-http-circe" % "3.8.0", + "org.apache.pekko" %% "pekko-http-testkit" % pekkoHttpVersion % Test ) ) .enablePlugins(JavaServerAppPackaging) @@ -288,7 +288,7 @@ lazy val balancer = project .settings(loggingAndTest) .settings(smallRunnerRuntimeDependenciesInTest) .settings( - libraryDependencies += akka("testkit") % Test + libraryDependencies += pekko("testkit") % Test ) .dependsOn(api.jvm(ScalaVersions.jvm), utils, storage, sbtRunner % Test, scalaCliRunner % Test) @@ -399,10 +399,10 @@ lazy val scalaCliRunner = project reStart := reStart.dependsOn(runnerRuntimeDependencies: _*).evaluated, resolvers ++= Resolver.sonatypeOssRepos("public"), libraryDependencies ++= Seq( - akka("actor"), - akka("testkit") % Test, - akka("cluster"), - akka("slf4j"), + pekko("actor"), + pekko("testkit") % Test, + pekko("cluster"), + pekko("slf4j"), "ch.epfl.scala" % "bsp4j" % "2.1.0-M7", "org.typelevel" %% "cats-core" % "2.10.0", "io.circe" %% "circe-parser" % "0.14.6", diff --git a/deployment/local.conf b/deployment/local.conf index d30de1468..61007b449 100644 --- a/deployment/local.conf +++ b/deployment/local.conf @@ -15,7 +15,7 @@ org.scastie { } web { hostname = "127.0.0.1" - akka-port = 15000 + remote-port = 15000 oauth2 { users-file = users.txt @@ -28,7 +28,7 @@ org.scastie { } } -akka.remote.artery.canonical { +pekko.remote.artery.canonical { hostname = "127.0.0.1" port = 15000 } diff --git a/deployment/logback.xml b/deployment/logback.xml index baf60ef62..062d7fc64 100644 --- a/deployment/logback.xml +++ b/deployment/logback.xml @@ -42,7 +42,7 @@ WARN - + diff --git a/deployment/production.conf b/deployment/production.conf index 732a68d33..231acdea1 100644 --- a/deployment/production.conf +++ b/deployment/production.conf @@ -24,7 +24,7 @@ org.scastie { web { // this is where web server will be running hostname = "scastie.scala-lang.org" - akka-port = 15000 + remote-port = 15000 oauth2 { users-file = /home/scastie/users.txt @@ -38,7 +38,7 @@ org.scastie { } } -akka.remote.artery.canonical { +pekko.remote.artery.canonical { // this is where load balancer will be running hostname = "scastie.scala-lang.org" port = 15000 diff --git a/deployment/staging.conf b/deployment/staging.conf index 1b1b1f7e2..c6a2782c3 100644 --- a/deployment/staging.conf +++ b/deployment/staging.conf @@ -24,7 +24,7 @@ org.scastie { web { // this is where web server will be running hostname = "scastie-dev.scala-lang.org" - akka-port = 15000 + remote-port = 15000 oauth2 { users-file = /home/scastie/users.txt @@ -38,7 +38,7 @@ org.scastie { } } -akka.remote.artery.canonical { +pekko.remote.artery.canonical { // this is where load balancer will be running hostname = "scastie-dev.scala-lang.org" port = 15000 diff --git a/project/Deployment.scala b/project/Deployment.scala index 2080113f8..20adb38d7 100644 --- a/project/Deployment.scala +++ b/project/Deployment.scala @@ -100,7 +100,7 @@ class ScastieConfig(val configurationFile: File) { val serverConfig = config.getConfig("org.scastie.web") val serverHostname = serverConfig.getString("hostname") - val serverAkkaPort = serverConfig.getInt("akka-port") + val serverRemotePort = serverConfig.getInt("remote-port") val metalsConfig = config.getConfig("org.scastie.metals") val metalsPort = metalsConfig.getInt("port") @@ -204,7 +204,7 @@ class Deployment( | -e RUNNER_PRODUCTION=true \\ | -e RUNNER_PORT=$$port \\ | -e SERVER_HOSTNAME=${config.serverHostname} \\ - | -e SERVER_AKKA_PORT=${config.serverAkkaPort} \\ + | -e SERVER_REMOTE_PORT=${config.serverRemotePort} \\ | -e RUNNER_HOSTNAME=${config.runnersHostname} \\ | -e COURSIER_CACHE=${sharedCacheDirectory("coursier")} \\ | $dockerImagePath diff --git a/run.sh b/run.sh index 0f79143de..c3f8e0222 100644 --- a/run.sh +++ b/run.sh @@ -4,7 +4,7 @@ docker run \ -e RUNNER_PRODUCTION=true \ -e RUNNER_PORT=5150 \ -e SERVER_HOSTNAME=127.0.0.1 \ - -e SERVER_AKKA_PORT=15000 \ + -e SERVER_REMOTE_PORT=15000 \ -e RUNNER_HOSTNAME=127.0.0.1 \ scalacenter/scastie-sbt-runner:9f373af33ffd1d479f777e2e7d7f1b020c1eaf32 @@ -14,7 +14,7 @@ docker run \ -e RUNNER_PRODUCTION=true \ -e RUNNER_PORT=5151 \ -e SERVER_HOSTNAME=127.0.0.1 \ - -e SERVER_AKKA_PORT=15000 \ + -e SERVER_REMOTE_PORT=15000 \ -e RUNNER_HOSTNAME=127.0.0.1 \ scalacenter/scastie-sbt-runner:9f373af33ffd1d479f777e2e7d7f1b020c1eaf32 diff --git a/sbt-runner/src/main/resources/application.conf b/sbt-runner/src/main/resources/application.conf index a81d829e9..cbd682b2d 100644 --- a/sbt-runner/src/main/resources/application.conf +++ b/sbt-runner/src/main/resources/application.conf @@ -2,8 +2,8 @@ org.scastie { sbt { hostname = "127.0.0.1" hostname = ${?RUNNER_HOSTNAME} - akka-port = 5150 - akka-port = ${?RUNNER_PORT} + remote-port = 5150 + remote-port = ${?RUNNER_PORT} reconnect = false reconnect = ${?RUNNER_RECONNECT} @@ -13,8 +13,8 @@ org.scastie { } } -akka { - loggers = ["akka.event.slf4j.Slf4jLogger"] +pekko { + loggers = ["org.apache.pekko.event.slf4j.Slf4jLogger"] loglevel = "INFO" actor { provider = cluster @@ -24,8 +24,8 @@ akka { remote { artery.canonical { hostname = ${org.scastie.sbt.hostname} - port = ${org.scastie.sbt.akka-port} + port = ${org.scastie.sbt.remote-port} } } } -akka.remote.artery.advanced.maximum-frame-size = 5 MiB +pekko.remote.artery.advanced.maximum-frame-size = 5 MiB diff --git a/sbt-runner/src/main/resources/logback.xml b/sbt-runner/src/main/resources/logback.xml index 922666d6e..fea314934 100644 --- a/sbt-runner/src/main/resources/logback.xml +++ b/sbt-runner/src/main/resources/logback.xml @@ -8,7 +8,7 @@ - + diff --git a/sbt-runner/src/main/scala/org/scastie/sbt/FormatActor.scala b/sbt-runner/src/main/scala/org/scastie/sbt/FormatActor.scala index 37cec6065..c3a97b262 100644 --- a/sbt-runner/src/main/scala/org/scastie/sbt/FormatActor.scala +++ b/sbt-runner/src/main/scala/org/scastie/sbt/FormatActor.scala @@ -3,7 +3,7 @@ package sbt import scala.meta._ -import akka.actor.Actor +import org.apache.pekko.actor.Actor import org.scastie.api.FormatRequest import org.scastie.api.FormatResponse diff --git a/sbt-runner/src/main/scala/org/scastie/sbt/SbtActor.scala b/sbt-runner/src/main/scala/org/scastie/sbt/SbtActor.scala index d61d096e5..d08b5d906 100644 --- a/sbt-runner/src/main/scala/org/scastie/sbt/SbtActor.scala +++ b/sbt-runner/src/main/scala/org/scastie/sbt/SbtActor.scala @@ -2,7 +2,7 @@ package org.scastie.sbt import org.scastie.api._ import org.scastie.util._ -import akka.actor.{Actor, ActorContext, ActorLogging, ActorRef, ActorSelection, ActorSystem, Props} +import org.apache.pekko.actor.{Actor, ActorContext, ActorLogging, ActorRef, ActorSelection, ActorSystem, Props} import scala.concurrent.duration._ @@ -21,7 +21,7 @@ class SbtActor(system: ActorSystem, def balancer(context: ActorContext, info: ReconnectInfo): ActorSelection = { import info._ context.actorSelection( - s"akka://Web@$serverHostname:$serverAkkaPort/user/DispatchActor/SbtDispatcher" + s"pekko://Web@$serverHostname:$serverRemotePort/user/DispatchActor/SbtDispatcher" ) } @@ -29,7 +29,7 @@ class SbtActor(system: ActorSystem, if (isProduction) { reconnectInfo.foreach { info => import info._ - balancer(context, info) ! RunnerConnect(actorHostname, actorAkkaPort) + balancer(context, info) ! RunnerConnect(actorHostname, actorRemotePort) } } } diff --git a/sbt-runner/src/main/scala/org/scastie/sbt/SbtMain.scala b/sbt-runner/src/main/scala/org/scastie/sbt/SbtMain.scala index ce1cbdc1c..c2b109cdc 100644 --- a/sbt-runner/src/main/scala/org/scastie/sbt/SbtMain.scala +++ b/sbt-runner/src/main/scala/org/scastie/sbt/SbtMain.scala @@ -3,7 +3,7 @@ package org.scastie.sbt import org.scastie.util.ScastieFileUtil.writeRunningPid import org.scastie.util.ReconnectInfo -import akka.actor.{ActorSystem, Props} +import org.apache.pekko.actor.{ActorSystem, Props} import com.typesafe.config.ConfigFactory import scala.concurrent.Await @@ -18,8 +18,8 @@ object SbtMain { val system = ActorSystem("SbtRunner") - val config2 = ConfigFactory.load().getConfig("akka.remote.artery.canonical") - logger.info("akka tcp config") + val config2 = ConfigFactory.load().getConfig("pekko.remote.artery.canonical") + logger.info("remote tcp config") logger.info(" '" + config2.getString("hostname") + "'") logger.info(" " + config2.getInt("port")) @@ -57,18 +57,18 @@ object SbtMain { val reconnectInfo = ReconnectInfo( serverHostname = serverConfig.getString("hostname"), - serverAkkaPort = serverConfig.getInt("akka-port"), + serverRemotePort = serverConfig.getInt("remote-port"), actorHostname = sbtConfig.getString("hostname"), - actorAkkaPort = sbtConfig.getInt("akka-port") + actorRemotePort = sbtConfig.getInt("remote-port") ) logger.info(" runTimeout: {}", runTimeout) logger.info(" reloadTimeout: {}", reloadTimeout) logger.info(" isProduction: {}", isProduction) logger.info(" runner hostname: {}", reconnectInfo.actorHostname) - logger.info(" runner port: {}", reconnectInfo.actorAkkaPort) + logger.info(" runner port: {}", reconnectInfo.actorRemotePort) logger.info(" server hostname: {}", reconnectInfo.serverHostname) - logger.info(" server port: {}", reconnectInfo.serverAkkaPort) + logger.info(" server port: {}", reconnectInfo.serverRemotePort) system.actorOf( Props( diff --git a/sbt-runner/src/main/scala/org/scastie/sbt/SbtProcess.scala b/sbt-runner/src/main/scala/org/scastie/sbt/SbtProcess.scala index 1ceae3609..ebf00c6e5 100644 --- a/sbt-runner/src/main/scala/org/scastie/sbt/SbtProcess.scala +++ b/sbt-runner/src/main/scala/org/scastie/sbt/SbtProcess.scala @@ -3,9 +3,9 @@ package org.scastie.sbt import java.nio.file._ import java.time.Instant -import akka.actor.{ActorRef, Cancellable, FSM, Stash} -import akka.pattern.ask -import akka.util.Timeout +import org.apache.pekko.actor.{ActorRef, Cancellable, FSM, Stash} +import org.apache.pekko.pattern.ask +import org.apache.pekko.util.Timeout import com.google.common.cache.CacheBuilder import scalacache._ import scalacache.guava._ diff --git a/sbt-runner/src/test/resources/application.conf b/sbt-runner/src/test/resources/application.conf index 5bcb7aa55..d1defef8b 100644 --- a/sbt-runner/src/test/resources/application.conf +++ b/sbt-runner/src/test/resources/application.conf @@ -1,6 +1,6 @@ org.scastie { sbt { - akka-port = 15150 + remote-port = 15150 } } -akka.actor.provider = akka.actor.LocalActorRefProvider +pekko.actor.provider = org.apache.pekko.actor.LocalActorRefProvider diff --git a/sbt-runner/src/test/scala/org/scastie/sbt/SbtActorTest.scala b/sbt-runner/src/test/scala/org/scastie/sbt/SbtActorTest.scala index 9ef229825..a7cf6996d 100644 --- a/sbt-runner/src/test/scala/org/scastie/sbt/SbtActorTest.scala +++ b/sbt-runner/src/test/scala/org/scastie/sbt/SbtActorTest.scala @@ -1,8 +1,8 @@ package org.scastie.sbt -import akka.actor.{ActorRef, ActorSystem, Props} -import akka.testkit.TestActor.AutoPilot -import akka.testkit.{ImplicitSender, TestKit, TestProbe} +import org.apache.pekko.actor.{ActorRef, ActorSystem, Props} +import org.apache.pekko.testkit.TestActor.AutoPilot +import org.apache.pekko.testkit.{ImplicitSender, TestKit, TestProbe} import org.scastie.runtime.api._ import org.scastie.api._ import org.scastie.util.SbtTask diff --git a/scala-cli-runner/src/main/resources/application.conf b/scala-cli-runner/src/main/resources/application.conf index e15c82783..2eed24b8e 100644 --- a/scala-cli-runner/src/main/resources/application.conf +++ b/scala-cli-runner/src/main/resources/application.conf @@ -2,8 +2,8 @@ org.scastie { scala-cli { hostname = "127.0.0.1" hostname = ${?RUNNER_HOSTNAME} - akka-port = 5250 - akka-port = ${?RUNNER_PORT} + remote-port = 5250 + remote-port = ${?RUNNER_PORT} reconnect = false reconnect = ${?RUNNER_RECONNECT} @@ -13,8 +13,8 @@ org.scastie { } } -akka { - loggers = ["akka.event.slf4j.Slf4jLogger"] +pekko { + loggers = ["org.apache.pekko.event.slf4j.Slf4jLogger"] loglevel = "INFO" actor { provider = cluster @@ -24,8 +24,8 @@ akka { remote { artery.canonical { hostname = ${org.scastie.scala-cli.hostname} - port = ${org.scastie.scala-cli.akka-port} + port = ${org.scastie.scala-cli.remote-port} } } } -akka.remote.artery.advanced.maximum-frame-size = 5 MiB +pekko.remote.artery.advanced.maximum-frame-size = 5 MiB diff --git a/scala-cli-runner/src/main/resources/logback.xml b/scala-cli-runner/src/main/resources/logback.xml index 922666d6e..fea314934 100644 --- a/scala-cli-runner/src/main/resources/logback.xml +++ b/scala-cli-runner/src/main/resources/logback.xml @@ -8,7 +8,7 @@ - + diff --git a/scala-cli-runner/src/main/scala/org/scastie/scalacli/ScalaCliActor.scala b/scala-cli-runner/src/main/scala/org/scastie/scalacli/ScalaCliActor.scala index 418758012..fa4ac6fff 100644 --- a/scala-cli-runner/src/main/scala/org/scastie/scalacli/ScalaCliActor.scala +++ b/scala-cli-runner/src/main/scala/org/scastie/scalacli/ScalaCliActor.scala @@ -1,10 +1,10 @@ package org.scastie.scalacli -import akka.actor.ActorSystem -import akka.actor.ActorRef -import akka.actor.Actor -import akka.actor.ActorLogging -import akka.actor.ActorContext +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.actor.ActorRef +import org.apache.pekko.actor.Actor +import org.apache.pekko.actor.ActorLogging +import org.apache.pekko.actor.ActorContext import org.scastie.util.ActorReconnecting import org.scastie.util.ReconnectInfo import org.scastie.api._ @@ -20,12 +20,12 @@ import scala.sys.process._ import java.nio.charset.StandardCharsets import scala.io.{Source => IOSource} import scala.util.control.NonFatal -import akka.actor.ActorSelection +import org.apache.pekko.actor.ActorSelection import scala.concurrent.duration.FiniteDuration import org.scastie.util.ScalaCliTask -import akka.util.Timeout +import org.apache.pekko.util.Timeout import scala.concurrent.duration._ -import akka.pattern.ask +import org.apache.pekko.pattern.ask import org.agrona.concurrent.status.AtomicCounter import java.util.concurrent.atomic.AtomicLong import java.nio.file.Files @@ -58,7 +58,7 @@ class ScalaCliActor( if (isProduction) { reconnectInfo.foreach { info => import info._ - balancer(context, info) ! RunnerConnect(actorHostname, actorAkkaPort) + balancer(context, info) ! RunnerConnect(actorHostname, actorRemotePort) } } } @@ -142,7 +142,7 @@ class ScalaCliActor( def balancer(context: ActorContext, info: ReconnectInfo): ActorSelection = { import info._ context.actorSelection( - s"akka://Web@$serverHostname:$serverAkkaPort/user/DispatchActor/ScalaCliDispatcher" + s"pekko://Web@$serverHostname:$serverRemotePort/user/DispatchActor/ScalaCliDispatcher" ) } diff --git a/scala-cli-runner/src/main/scala/org/scastie/scalacli/ScalaCliMain.scala b/scala-cli-runner/src/main/scala/org/scastie/scalacli/ScalaCliMain.scala index 736ed04bd..246207339 100644 --- a/scala-cli-runner/src/main/scala/org/scastie/scalacli/ScalaCliMain.scala +++ b/scala-cli-runner/src/main/scala/org/scastie/scalacli/ScalaCliMain.scala @@ -3,7 +3,7 @@ package org.scastie.scalacli import org.scastie.util.ScastieFileUtil.writeRunningPid import org.scastie.util.ReconnectInfo -import akka.actor.{ActorSystem, Props} +import org.apache.pekko.actor.{ActorSystem, Props} import com.typesafe.config.ConfigFactory import scala.concurrent.Await @@ -24,8 +24,8 @@ object ScalaCliMain { assert(scala.sys.process.Process("which scala-cli").! == 0, "scala-cli is not installed") - val config2 = ConfigFactory.load().getConfig("akka.remote.artery.canonical") - logger.info("akka tcp config") + val config2 = ConfigFactory.load().getConfig("pekko.remote.artery.canonical") + logger.info("remote tcp config") logger.info(" '" + config2.getString("hostname") + "'") logger.info(" " + config2.getInt("port")) @@ -70,9 +70,9 @@ object ScalaCliMain { // Reconnect info val reconnectInfo = ReconnectInfo( serverHostname = serverConfig.getString("hostname"), - serverAkkaPort = serverConfig.getInt("akka-port"), + serverRemotePort = serverConfig.getInt("remote-port"), actorHostname = scalaCliConfig.getString("hostname"), - actorAkkaPort = scalaCliConfig.getInt("akka-port") + actorRemotePort = scalaCliConfig.getInt("remote-port") ) system.actorOf( @@ -92,9 +92,9 @@ object ScalaCliMain { logger.info(" compilationTimeout: {}", compilationTimeout) logger.info(" isProduction: {}", isProduction) logger.info(" runner hostname: {}", reconnectInfo.actorHostname) - logger.info(" runner port: {}", reconnectInfo.actorAkkaPort) + logger.info(" runner port: {}", reconnectInfo.actorRemotePort) logger.info(" server hostname: {}", reconnectInfo.serverHostname) - logger.info(" server port: {}", reconnectInfo.serverAkkaPort) + logger.info(" server port: {}", reconnectInfo.serverRemotePort) logger.info("ScalaCliActor started") diff --git a/scala-cli-runner/src/main/scala/org/scastie/scalacli/ScalaCliRunner.scala b/scala-cli-runner/src/main/scala/org/scastie/scalacli/ScalaCliRunner.scala index 7ad214969..396487806 100644 --- a/scala-cli-runner/src/main/scala/org/scastie/scalacli/ScalaCliRunner.scala +++ b/scala-cli-runner/src/main/scala/org/scastie/scalacli/ScalaCliRunner.scala @@ -27,7 +27,7 @@ import scala.concurrent.duration.FiniteDuration import io.circe._ import io.circe.parser._ import scala.collection.mutable.ListBuffer -import akka.pattern.after +import org.apache.pekko.pattern.after import java.lang import java.util.concurrent.atomic.AtomicReference import cats.syntax.all._ diff --git a/scala-cli-runner/src/test/resources/application.conf b/scala-cli-runner/src/test/resources/application.conf index 5bcb7aa55..d1defef8b 100644 --- a/scala-cli-runner/src/test/resources/application.conf +++ b/scala-cli-runner/src/test/resources/application.conf @@ -1,6 +1,6 @@ org.scastie { sbt { - akka-port = 15150 + remote-port = 15150 } } -akka.actor.provider = akka.actor.LocalActorRefProvider +pekko.actor.provider = org.apache.pekko.actor.LocalActorRefProvider diff --git a/scala-cli-runner/src/test/resources/logback.xml b/scala-cli-runner/src/test/resources/logback.xml index 922666d6e..fea314934 100644 --- a/scala-cli-runner/src/test/resources/logback.xml +++ b/scala-cli-runner/src/test/resources/logback.xml @@ -8,7 +8,7 @@ - + diff --git a/scala-cli-runner/src/test/scala/org/scastie/scalacli/ScalaCliRunnerTest.scala b/scala-cli-runner/src/test/scala/org/scastie/scalacli/ScalaCliRunnerTest.scala index de89513fb..35b89876b 100644 --- a/scala-cli-runner/src/test/scala/org/scastie/scalacli/ScalaCliRunnerTest.scala +++ b/scala-cli-runner/src/test/scala/org/scastie/scalacli/ScalaCliRunnerTest.scala @@ -10,9 +10,9 @@ import org.scastie.api._ import org.scastie.runtime.api._ import scala.concurrent.Future import scala.concurrent.duration._ -import akka.actor.{ActorRef, ActorSystem, Props} -import akka.testkit.TestActor.AutoPilot -import akka.testkit.{ImplicitSender, TestKit, TestProbe} +import org.apache.pekko.actor.{ActorRef, ActorSystem, Props} +import org.apache.pekko.testkit.TestActor.AutoPilot +import org.apache.pekko.testkit.{ImplicitSender, TestKit, TestProbe} import org.scastie.runtime.api._ import org.scastie.api._ import org.scastie.util.SbtTask @@ -22,7 +22,7 @@ import org.scalatest.Retries import org.scalatest.tagobjects.Retryable import scala.concurrent.duration._ -import akka.testkit.TestActorRef +import org.apache.pekko.testkit.TestActorRef import org.scastie.util.ScalaCliTask import org.scastie.util.StopRunner import org.scastie.util.RunnerTerminated diff --git a/server/src/main/resources/logback.xml b/server/src/main/resources/logback.xml index 4a046d506..6d2ed13bc 100644 --- a/server/src/main/resources/logback.xml +++ b/server/src/main/resources/logback.xml @@ -7,7 +7,7 @@ - + diff --git a/server/src/main/resources/reference.conf b/server/src/main/resources/reference.conf index a270fcf61..3cbaa6014 100644 --- a/server/src/main/resources/reference.conf +++ b/server/src/main/resources/reference.conf @@ -29,8 +29,8 @@ org.scastie.web { } } -akka { - loggers = ["akka.event.slf4j.Slf4jLogger"] +pekko { + loggers = ["org.apache.pekko.event.slf4j.Slf4jLogger"] loglevel = "INFO" http.server { idle-timeout = 30s @@ -48,4 +48,4 @@ akka { } } } -akka.remote.artery.advanced.maximum-frame-size = 5 MiB +pekko.remote.artery.advanced.maximum-frame-size = 5 MiB diff --git a/server/src/main/scala/org/scastie/server/RestApiServer.scala b/server/src/main/scala/org/scastie/server/RestApiServer.scala index 66d0c3921..0f3ed1c34 100644 --- a/server/src/main/scala/org/scastie/server/RestApiServer.scala +++ b/server/src/main/scala/org/scastie/server/RestApiServer.scala @@ -4,10 +4,10 @@ package web import org.scastie.api._ import balancer._ -import akka.pattern.ask -import akka.actor.ActorRef -import akka.util.Timeout -import akka.http.scaladsl.model.RemoteAddress +import org.apache.pekko.pattern.ask +import org.apache.pekko.actor.ActorRef +import org.apache.pekko.util.Timeout +import org.apache.pekko.http.scaladsl.model.RemoteAddress import scala.concurrent.{Future, ExecutionContext} import scala.concurrent.duration.DurationInt diff --git a/server/src/main/scala/org/scastie/server/ServerMain.scala b/server/src/main/scala/org/scastie/server/ServerMain.scala index 3f0e3e7b6..eb970596c 100644 --- a/server/src/main/scala/org/scastie/server/ServerMain.scala +++ b/server/src/main/scala/org/scastie/server/ServerMain.scala @@ -1,10 +1,10 @@ package org.scastie.web -import akka.actor.ActorSystem -import akka.actor.Props -import akka.http.scaladsl._ -import akka.stream.ActorMaterializer -import ch.megard.akka.http.cors.scaladsl.CorsDirectives._ +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.actor.Props +import org.apache.pekko.http.scaladsl._ +import org.apache.pekko.stream.ActorMaterializer +import org.apache.pekko.http.cors.scaladsl.CorsDirectives._ import org.scastie.balancer._ import org.scastie.util.ScastieFileUtil import org.scastie.web.oauth2._ @@ -29,8 +29,8 @@ object ServerMain { if (args.isEmpty) 9000 else args.head.toInt - val config2 = ConfigFactory.load().getConfig("akka.remote.artery.canonical") - logger.info("akka tcp config") + val config2 = ConfigFactory.load().getConfig("pekko.remote.artery.canonical") + logger.info("pekko tcp config") logger.info(config2.getString("hostname")) logger.info(config2.getInt("port").toString) diff --git a/server/src/main/scala/org/scastie/server/oauth2/Github.scala b/server/src/main/scala/org/scastie/server/oauth2/Github.scala index ce31bf54a..2677d42c4 100644 --- a/server/src/main/scala/org/scastie/server/oauth2/Github.scala +++ b/server/src/main/scala/org/scastie/server/oauth2/Github.scala @@ -1,17 +1,17 @@ package org.scastie.web.oauth2 -import akka.actor.ActorSystem -import akka.http.scaladsl._ -import akka.http.scaladsl.model.HttpMethods.POST -import akka.http.scaladsl.model.Uri._ -import akka.http.scaladsl.model._ -import akka.http.scaladsl.model.headers._ -import akka.http.scaladsl.unmarshalling.Unmarshal +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.http.scaladsl._ +import org.apache.pekko.http.scaladsl.model.HttpMethods.POST +import org.apache.pekko.http.scaladsl.model.Uri._ +import org.apache.pekko.http.scaladsl.model._ +import org.apache.pekko.http.scaladsl.model.headers._ +import org.apache.pekko.http.scaladsl.unmarshalling.Unmarshal import org.scastie.api.User import io.circe._ import io.circe.generic.semiauto._ import com.typesafe.config.ConfigFactory -import de.heikoseeberger.akkahttpcirce.FailFastCirceSupport +import com.github.pjfanning.pekkohttpcirce.FailFastCirceSupport import scala.concurrent.Future diff --git a/server/src/main/scala/org/scastie/server/oauth2/GithubUserSession.scala b/server/src/main/scala/org/scastie/server/oauth2/GithubUserSession.scala index ceee9415e..4e08f58db 100644 --- a/server/src/main/scala/org/scastie/server/oauth2/GithubUserSession.scala +++ b/server/src/main/scala/org/scastie/server/oauth2/GithubUserSession.scala @@ -4,10 +4,10 @@ import java.lang.System.{lineSeparator => nl} import java.nio.file._ import java.util.UUID -import akka.actor.ActorSystem +import org.apache.pekko.actor.ActorSystem import org.scastie.api.User import org.scastie.api.UserData -import com.softwaremill.session._ +import com.softwaremill.pekkohttpsession._ import com.typesafe.config.ConfigFactory import com.typesafe.scalalogging.Logger import io.circe.syntax._ diff --git a/server/src/main/scala/org/scastie/server/oauth2/InMemoryRefreshTokenStorage.scala b/server/src/main/scala/org/scastie/server/oauth2/InMemoryRefreshTokenStorage.scala index a60e177a1..f7d599c41 100644 --- a/server/src/main/scala/org/scastie/server/oauth2/InMemoryRefreshTokenStorage.scala +++ b/server/src/main/scala/org/scastie/server/oauth2/InMemoryRefreshTokenStorage.scala @@ -1,9 +1,9 @@ package org.scastie.web.oauth2 -import com.softwaremill.session.{RefreshTokenData, RefreshTokenStorage, RefreshTokenLookupResult} -import akka.actor.{Actor, ActorSystem, Props} -import akka.pattern.ask -import akka.util.Timeout +import com.softwaremill.pekkohttpsession.{RefreshTokenData, RefreshTokenStorage, RefreshTokenLookupResult} +import org.apache.pekko.actor.{Actor, ActorSystem, Props} +import org.apache.pekko.pattern.ask +import org.apache.pekko.util.Timeout import scala.concurrent.Future import scala.concurrent.duration._ diff --git a/server/src/main/scala/org/scastie/server/oauth2/UserDirectives.scala b/server/src/main/scala/org/scastie/server/oauth2/UserDirectives.scala index 572950c01..522ba4a23 100644 --- a/server/src/main/scala/org/scastie/server/oauth2/UserDirectives.scala +++ b/server/src/main/scala/org/scastie/server/oauth2/UserDirectives.scala @@ -3,10 +3,10 @@ package org.scastie.web.oauth2 import org.scastie.api.User import org.scastie.api.UserData -import akka.http.scaladsl._ +import org.apache.pekko.http.scaladsl._ import server._ -import com.softwaremill.session._ +import com.softwaremill.pekkohttpsession._ import SessionDirectives._ import SessionOptions._ diff --git a/server/src/main/scala/org/scastie/server/routes/ApiRoutes.scala b/server/src/main/scala/org/scastie/server/routes/ApiRoutes.scala index 0d3cb906e..2de442827 100644 --- a/server/src/main/scala/org/scastie/server/routes/ApiRoutes.scala +++ b/server/src/main/scala/org/scastie/server/routes/ApiRoutes.scala @@ -1,14 +1,14 @@ package org.scastie.web.routes -import akka.actor.{ActorRef, ActorSystem} -import akka.http.scaladsl.coding.Coders.Gzip -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.{Directive1, Route} +import org.apache.pekko.actor.{ActorRef, ActorSystem} +import org.apache.pekko.http.scaladsl.coding.Coders.Gzip +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.{Directive1, Route} import org.scastie.api._ import org.scastie.web._ import org.scastie.web.oauth2._ import org.scastie.server.utils.NightlyVersionFetcher -import de.heikoseeberger.akkahttpcirce.FailFastCirceSupport +import com.github.pjfanning.pekkohttpcirce.FailFastCirceSupport class ApiRoutes( dispatchActor: ActorRef, diff --git a/server/src/main/scala/org/scastie/server/routes/DownloadRoutes.scala b/server/src/main/scala/org/scastie/server/routes/DownloadRoutes.scala index bbeb28798..80f8f681f 100644 --- a/server/src/main/scala/org/scastie/server/routes/DownloadRoutes.scala +++ b/server/src/main/scala/org/scastie/server/routes/DownloadRoutes.scala @@ -2,16 +2,16 @@ package org.scastie.web.routes import org.scastie.balancer.DownloadSnippet -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.Route -import akka.http.scaladsl.model.headers.RawHeader +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.Route +import org.apache.pekko.http.scaladsl.model.headers.RawHeader -import akka.actor.ActorRef -import akka.pattern.ask +import org.apache.pekko.actor.ActorRef +import org.apache.pekko.pattern.ask import java.nio.file.Path -import akka.util.Timeout +import org.apache.pekko.util.Timeout import scala.concurrent.duration.DurationInt class DownloadRoutes(dispatchActor: ActorRef) { diff --git a/server/src/main/scala/org/scastie/server/routes/FrontPageRoutes.scala b/server/src/main/scala/org/scastie/server/routes/FrontPageRoutes.scala index f617b2373..91df7e422 100644 --- a/server/src/main/scala/org/scastie/server/routes/FrontPageRoutes.scala +++ b/server/src/main/scala/org/scastie/server/routes/FrontPageRoutes.scala @@ -1,19 +1,19 @@ package org.scastie.web.routes -import akka.actor.ActorRef -import akka.http.scaladsl.coding.Coders.Gzip -import akka.http.scaladsl.coding.Coders.NoCoding -import akka.http.scaladsl.model.HttpEntity -import akka.http.scaladsl.model._ -import akka.http.scaladsl.model.headers.{`Cache-Control`, CacheDirectives} -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.Route -import akka.http.scaladsl.server.RouteResult -import akka.pattern.ask -import akka.stream.Materializer -import akka.stream.scaladsl.StreamConverters -import akka.util.ByteString -import akka.util.Timeout +import org.apache.pekko.actor.ActorRef +import org.apache.pekko.http.scaladsl.coding.Coders.Gzip +import org.apache.pekko.http.scaladsl.coding.Coders.NoCoding +import org.apache.pekko.http.scaladsl.model.HttpEntity +import org.apache.pekko.http.scaladsl.model._ +import org.apache.pekko.http.scaladsl.model.headers.{`Cache-Control`, CacheDirectives} +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.Route +import org.apache.pekko.http.scaladsl.server.RouteResult +import org.apache.pekko.pattern.ask +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.StreamConverters +import org.apache.pekko.util.ByteString +import org.apache.pekko.util.Timeout import org.scastie.api.FetchResult import org.scastie.api.SnippetId import org.scastie.api.SnippetUserPart diff --git a/server/src/main/scala/org/scastie/server/routes/OAuth2Routes.scala b/server/src/main/scala/org/scastie/server/routes/OAuth2Routes.scala index b8350fb57..65af213a0 100644 --- a/server/src/main/scala/org/scastie/server/routes/OAuth2Routes.scala +++ b/server/src/main/scala/org/scastie/server/routes/OAuth2Routes.scala @@ -4,24 +4,24 @@ package routes import oauth2._ -import com.softwaremill.session.SessionDirectives._ -import com.softwaremill.session.SessionOptions._ -import com.softwaremill.session.CsrfDirectives._ -import com.softwaremill.session.CsrfOptions._ +import com.softwaremill.pekkohttpsession.SessionDirectives._ +import com.softwaremill.pekkohttpsession.SessionOptions._ +import com.softwaremill.pekkohttpsession.CsrfDirectives._ +import com.softwaremill.pekkohttpsession.CsrfOptions._ -import akka.http.scaladsl.model._ -import akka.http.scaladsl.model.Uri.Query -import akka.http.scaladsl.model.StatusCodes.TemporaryRedirect -import akka.http.scaladsl.model.headers.Referer -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.Route +import org.apache.pekko.http.scaladsl.model._ +import org.apache.pekko.http.scaladsl.model.Uri.Query +import org.apache.pekko.http.scaladsl.model.StatusCodes.TemporaryRedirect +import org.apache.pekko.http.scaladsl.model.headers.Referer +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.Route import scala.concurrent.ExecutionContext import org.scastie.api.User import io.circe._ import io.circe.generic.semiauto._ import io.circe.syntax._ -import de.heikoseeberger.akkahttpcirce.FailFastCirceSupport._ +import com.github.pjfanning.pekkohttpcirce.FailFastCirceSupport._ import org.scastie.api.UserData class OAuth2Routes(github: Github, session: GithubUserSession)( diff --git a/server/src/main/scala/org/scastie/server/routes/ProgressRoutes.scala b/server/src/main/scala/org/scastie/server/routes/ProgressRoutes.scala index 55558591a..de53a0277 100644 --- a/server/src/main/scala/org/scastie/server/routes/ProgressRoutes.scala +++ b/server/src/main/scala/org/scastie/server/routes/ProgressRoutes.scala @@ -1,16 +1,16 @@ package org.scastie.web.routes -import akka.NotUsed -import akka.actor.ActorRef -import akka.http.scaladsl.coding.Coders.Gzip -import akka.http.scaladsl.marshalling.sse.EventStreamMarshalling._ -import akka.http.scaladsl.model._ -import akka.http.scaladsl.model.sse.ServerSentEvent -import akka.http.scaladsl.model.ws.TextMessage._ -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.Route -import akka.pattern.ask -import akka.stream.scaladsl._ +import org.apache.pekko.NotUsed +import org.apache.pekko.actor.ActorRef +import org.apache.pekko.http.scaladsl.coding.Coders.Gzip +import org.apache.pekko.http.scaladsl.marshalling.sse.EventStreamMarshalling._ +import org.apache.pekko.http.scaladsl.model._ +import org.apache.pekko.http.scaladsl.model.sse.ServerSentEvent +import org.apache.pekko.http.scaladsl.model.ws.TextMessage._ +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.Route +import org.apache.pekko.pattern.ask +import org.apache.pekko.stream.scaladsl._ import org.scastie.api._ import org.scastie.balancer._ import io.circe.syntax._ diff --git a/server/src/main/scala/org/scastie/server/routes/ScalaJsRoutes.scala b/server/src/main/scala/org/scastie/server/routes/ScalaJsRoutes.scala index 278568fa8..b1be273c3 100644 --- a/server/src/main/scala/org/scastie/server/routes/ScalaJsRoutes.scala +++ b/server/src/main/scala/org/scastie/server/routes/ScalaJsRoutes.scala @@ -2,13 +2,13 @@ package org.scastie.web.routes import org.scastie.api._ -import akka.util.Timeout +import org.apache.pekko.util.Timeout -import akka.pattern.ask -import akka.actor.{ActorRef, ActorSystem} -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.Route -import akka.http.scaladsl.coding.Coders.Gzip +import org.apache.pekko.pattern.ask +import org.apache.pekko.actor.{ActorRef, ActorSystem} +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.Route +import org.apache.pekko.http.scaladsl.coding.Coders.Gzip import scala.concurrent.duration.DurationInt diff --git a/server/src/main/scala/org/scastie/server/routes/ScalaLangRoutes.scala b/server/src/main/scala/org/scastie/server/routes/ScalaLangRoutes.scala index f2a78b77a..4fc159d01 100644 --- a/server/src/main/scala/org/scastie/server/routes/ScalaLangRoutes.scala +++ b/server/src/main/scala/org/scastie/server/routes/ScalaLangRoutes.scala @@ -5,14 +5,14 @@ import org.scastie.web.oauth2._ import org.scastie.balancer._ -import akka.util.Timeout -import akka.actor.{ActorRef, ActorSystem} +import org.apache.pekko.util.Timeout +import org.apache.pekko.actor.{ActorRef, ActorSystem} -import akka.http.scaladsl.model.StatusCodes.Created -import akka.http.scaladsl.server.Route -import akka.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.model.StatusCodes.Created +import org.apache.pekko.http.scaladsl.server.Route +import org.apache.pekko.http.scaladsl.server.Directives._ -import akka.pattern.ask +import org.apache.pekko.pattern.ask import scala.concurrent.duration.DurationInt diff --git a/server/src/main/scala/org/scastie/server/routes/StatusRoutes.scala b/server/src/main/scala/org/scastie/server/routes/StatusRoutes.scala index 9535553f8..13e99458c 100644 --- a/server/src/main/scala/org/scastie/server/routes/StatusRoutes.scala +++ b/server/src/main/scala/org/scastie/server/routes/StatusRoutes.scala @@ -1,15 +1,15 @@ package org.scastie.web.routes -import akka.NotUsed -import akka.actor.ActorRef -import akka.http.scaladsl.marshalling.sse.EventStreamMarshalling._ -import akka.http.scaladsl.model._ -import akka.http.scaladsl.model.sse.ServerSentEvent -import akka.http.scaladsl.model.ws.TextMessage._ -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.{Route, _} -import akka.pattern.ask -import akka.stream.scaladsl._ +import org.apache.pekko.NotUsed +import org.apache.pekko.actor.ActorRef +import org.apache.pekko.http.scaladsl.marshalling.sse.EventStreamMarshalling._ +import org.apache.pekko.http.scaladsl.model._ +import org.apache.pekko.http.scaladsl.model.sse.ServerSentEvent +import org.apache.pekko.http.scaladsl.model.ws.TextMessage._ +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.{Route, _} +import org.apache.pekko.pattern.ask +import org.apache.pekko.stream.scaladsl._ import org.scastie.api._ import org.scastie.balancer._ import org.scastie.web.oauth2.UserDirectives diff --git a/server/src/main/scala/org/scastie/server/routes/package.scala b/server/src/main/scala/org/scastie/server/routes/package.scala index 7907b0fb2..9f0979e03 100644 --- a/server/src/main/scala/org/scastie/server/routes/package.scala +++ b/server/src/main/scala/org/scastie/server/routes/package.scala @@ -2,8 +2,8 @@ package org.scastie.web import org.scastie.api._ -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.{PathMatcher, Route} +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.{PathMatcher, Route} package object routes { def snippetIdStart(matcherStart: String)(f: SnippetId => Route): Route = diff --git a/server/src/test/resources/application.conf b/server/src/test/resources/application.conf index 2a8ec0746..05c1fd77a 100644 --- a/server/src/test/resources/application.conf +++ b/server/src/test/resources/application.conf @@ -1 +1 @@ -akka.actor.provider = akka.actor.LocalActorRefProvider \ No newline at end of file +pekko.actor.provider = org.apache.pekko.actor.LocalActorRefProvider \ No newline at end of file diff --git a/server/src/test/scala/org/scastie/web/SnippetIdMatcherTests.scala b/server/src/test/scala/org/scastie/web/SnippetIdMatcherTests.scala index e7e9e8dc5..6357c4b8c 100644 --- a/server/src/test/scala/org/scastie/web/SnippetIdMatcherTests.scala +++ b/server/src/test/scala/org/scastie/web/SnippetIdMatcherTests.scala @@ -1,11 +1,11 @@ package org.scastie.web.routes -import akka.http.scaladsl.server.Directives._ -import akka.http.scaladsl.server.Route -import akka.http.scaladsl.testkit.ScalatestRouteTest +import org.apache.pekko.http.scaladsl.server.Directives._ +import org.apache.pekko.http.scaladsl.server.Route +import org.apache.pekko.http.scaladsl.testkit.ScalatestRouteTest import org.scastie.api.{SnippetId, SnippetUserPart} import org.scalatest.funsuite.AnyFunSuite -import de.heikoseeberger.akkahttpcirce.FailFastCirceSupport +import com.github.pjfanning.pekkohttpcirce.FailFastCirceSupport class SnippetIdMatcherTests extends AnyFunSuite with ScalatestRouteTest { diff --git a/storage/src/test/resources/logback.xml b/storage/src/test/resources/logback.xml index cac773576..c452f6fb3 100644 --- a/storage/src/test/resources/logback.xml +++ b/storage/src/test/resources/logback.xml @@ -7,7 +7,7 @@ - + diff --git a/utils/src/main/resources/reference.conf b/utils/src/main/resources/reference.conf index 8869f1479..3282d1095 100644 --- a/utils/src/main/resources/reference.conf +++ b/utils/src/main/resources/reference.conf @@ -2,8 +2,8 @@ org.scastie { web { hostname = "127.0.0.1" hostname = ${?SERVER_HOSTNAME} - akka-port = 15000 - akka-port = ${?SERVER_AKKA_PORT} + remote-port = 15000 + remote-port = ${?SERVER_REMOTE_PORT} } runners { @@ -14,11 +14,11 @@ org.scastie { } -akka { +pekko { process { blocking-process { # The configuration key to use in order to override the dispatcher used for blocking IO. - blocking-io-dispatcher-id = "akka.process.blocking-process.blocking-io-dispatcher" + blocking-io-dispatcher-id = "pekko.process.blocking-process.blocking-io-dispatcher" # The default dispatcher to be used for IO operations within the BlockingProcess actor blocking-io-dispatcher { diff --git a/utils/src/main/scala/org/scastie/util/BlockingProcess.scala b/utils/src/main/scala/org/scastie/util/BlockingProcess.scala index f8e48425a..248055f75 100644 --- a/utils/src/main/scala/org/scastie/util/BlockingProcess.scala +++ b/utils/src/main/scala/org/scastie/util/BlockingProcess.scala @@ -1,12 +1,12 @@ /** * Copyright (C) 2009-2014 Typesafe Inc. */ -package akka.contrib.process +package org.scastie.util -import akka.actor.{Actor, ActorLogging, ActorRef, NoSerializationVerificationNeeded, Props, SupervisorStrategy, Terminated} -import akka.stream.{ActorAttributes, IOResult} -import akka.stream.scaladsl.{Sink, Source, StreamConverters} -import akka.util.{ByteString, Helpers} +import org.apache.pekko.actor.{Actor, ActorLogging, ActorRef, NoSerializationVerificationNeeded, Props, SupervisorStrategy, Terminated} +import org.apache.pekko.stream.{ActorAttributes, IOResult} +import org.apache.pekko.stream.scaladsl.{Sink, Source, StreamConverters} +import org.apache.pekko.util.{ByteString, Helpers} import java.io.File import java.lang.{Process => JavaProcess, ProcessBuilder => JavaProcessBuilder} import java.util.concurrent.TimeUnit @@ -25,16 +25,16 @@ object BlockingProcess { * The configuration key to use in order to override the dispatcher used for blocking IO. */ final val BlockingIODispatcherId = - "akka.process.blocking-process.blocking-io-dispatcher-id" + "pekko.process.blocking-process.blocking-io-dispatcher-id" /** * Sent to the receiver on startup - specifies the streams used for managing input, output and error respectively. * This message should only be received by the parent of the BlockingProcess and should not be passed across the * JVM boundary (the publishers are not serializable). * - * @param stdin a `akka.stream.scaladsl.Sink[ByteString, Future[IOResult]]` for the standard input stream of the process - * @param stdout a `akka.stream.scaladsl.Source[ByteString, Future[IOResult]]` for the standard output stream of the process - * @param stderr a `akka.stream.scaladsl.Source[ByteString, Future[IOResult]]` for the standard error stream of the process + * @param stdin a `org.apache.pekko.stream.scaladsl.Sink[ByteString, Future[IOResult]]` for the standard input stream of the process + * @param stdout a `org.apache.pekko.stream.scaladsl.Source[ByteString, Future[IOResult]]` for the standard output stream of the process + * @param stderr a `org.apache.pekko.stream.scaladsl.Source[ByteString, Future[IOResult]]` for the standard error stream of the process */ case class Started(pid: Option[Long], stdin: Sink[ByteString, Future[IOResult]], @@ -129,7 +129,7 @@ object BlockingProcess { * stdout and stderr events. When the process exists (determined by periodically polling process.isAlive()) then * the process's exit code is communicated to the receiver in a BlockingProcess.Exited event. * - * A dispatcher as indicated by the "akka.process.blocking-process.blocking-io-dispatcher-id" setting is used + * A dispatcher as indicated by the "pekko.process.blocking-process.blocking-io-dispatcher-id" setting is used * internally by the actor as various JDK calls are made which can block. */ class BlockingProcess(command: immutable.Seq[String], directory: File, environment: Map[String, String], stdioTimeout: Duration) @@ -223,7 +223,7 @@ private object ProcessDestroyer { * The configuration key to use for the inspection interval. */ final val InspectionInterval = - "akka.process.blocking-process.inspection-interval" + "pekko.process.blocking-process.inspection-interval" /** * Inspect the Process to ensure it is still alive. This is necessary because diff --git a/utils/src/main/scala/org/scastie/util/GraphStageForwarder.scala b/utils/src/main/scala/org/scastie/util/GraphStageForwarder.scala index 8b65d5a8b..4f89ebb6f 100644 --- a/utils/src/main/scala/org/scastie/util/GraphStageForwarder.scala +++ b/utils/src/main/scala/org/scastie/util/GraphStageForwarder.scala @@ -1,8 +1,8 @@ package org.scastie.util -import akka.actor.ActorRef -import akka.stream.{Attributes, Outlet, SourceShape} -import akka.stream.stage.{GraphStage, GraphStageLogic} +import org.apache.pekko.actor.ActorRef +import org.apache.pekko.stream.{Attributes, Outlet, SourceShape} +import org.apache.pekko.stream.stage.{GraphStage, GraphStageLogic} import scala.reflect.runtime.universe._ diff --git a/utils/src/main/scala/org/scastie/util/GraphStageLogicForwarder.scala b/utils/src/main/scala/org/scastie/util/GraphStageLogicForwarder.scala index c657d8bec..6940dc5e0 100644 --- a/utils/src/main/scala/org/scastie/util/GraphStageLogicForwarder.scala +++ b/utils/src/main/scala/org/scastie/util/GraphStageLogicForwarder.scala @@ -1,8 +1,8 @@ package org.scastie.util -import akka.actor.ActorRef -import akka.stream.{Outlet, SourceShape} -import akka.stream.stage.{GraphStageLogic, OutHandler} +import org.apache.pekko.actor.ActorRef +import org.apache.pekko.stream.{Outlet, SourceShape} +import org.apache.pekko.stream.stage.{GraphStageLogic, OutHandler} import scala.collection.mutable.{Queue => MQueue} import scala.reflect.runtime.universe._ diff --git a/utils/src/main/scala/org/scastie/util/ProcessActor.scala b/utils/src/main/scala/org/scastie/util/ProcessActor.scala index 00a7f46b8..de7a2c8db 100644 --- a/utils/src/main/scala/org/scastie/util/ProcessActor.scala +++ b/utils/src/main/scala/org/scastie/util/ProcessActor.scala @@ -4,11 +4,10 @@ import java.nio.file._ import java.time.Instant import java.util.concurrent.atomic.AtomicLong -import akka.actor.{Actor, ActorRef, Props, Stash} -import akka.contrib.process._ -import akka.stream.scaladsl.{Flow, Framing, Sink, Source} -import akka.stream.{ActorMaterializer, ActorMaterializerSettings, OverflowStrategy, ThrottleMode} -import akka.util.ByteString +import org.apache.pekko.actor.{Actor, ActorRef, Props, Stash} +import org.apache.pekko.stream.scaladsl.{Flow, Framing, Sink, Source} +import org.apache.pekko.stream.{ActorMaterializer, ActorMaterializerSettings, OverflowStrategy, ThrottleMode} +import org.apache.pekko.util.ByteString import org.scastie.api.{ProcessOutput, ProcessOutputType} import org.slf4j.LoggerFactory diff --git a/utils/src/main/scala/org/scastie/util/ReconnectingActor.scala b/utils/src/main/scala/org/scastie/util/ReconnectingActor.scala index 6904ea3f7..f381db20b 100644 --- a/utils/src/main/scala/org/scastie/util/ReconnectingActor.scala +++ b/utils/src/main/scala/org/scastie/util/ReconnectingActor.scala @@ -1,13 +1,13 @@ package org.scastie.util -import akka.actor.{Actor, ActorContext, ActorLogging, Cancellable} -import akka.remote.DisassociatedEvent +import org.apache.pekko.actor.{Actor, ActorContext, ActorLogging, Cancellable} +import org.apache.pekko.remote.DisassociatedEvent import org.scastie.api.ActorConnected import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration._ -case class ReconnectInfo(serverHostname: String, serverAkkaPort: Int, actorHostname: String, actorAkkaPort: Int) +case class ReconnectInfo(serverHostname: String, serverRemotePort: Int, actorHostname: String, actorRemotePort: Int) trait ActorReconnecting extends Actor with ActorLogging { @@ -54,12 +54,12 @@ trait ActorReconnecting extends Actor with ActorLogging { .map(info => ev.remoteAddress.host.contains(info.serverHostname)) .getOrElse(false) - val isServerAkkaPort = + val isServerRemotePort = reconnectInfo - .map(info => ev.remoteAddress.port.contains(info.serverAkkaPort)) + .map(info => ev.remoteAddress.port.contains(info.serverRemotePort)) .getOrElse(false) - if (isServerHostname && isServerAkkaPort && ev.inbound) { + if (isServerHostname && isServerRemotePort && ev.inbound) { log.warning("Disconnected from server") onDisconnected() setupReconnectCallback(context) diff --git a/utils/src/main/scala/org/scastie/util/SbtTask.scala b/utils/src/main/scala/org/scastie/util/SbtTask.scala index 23d12484f..7c2a93e3b 100644 --- a/utils/src/main/scala/org/scastie/util/SbtTask.scala +++ b/utils/src/main/scala/org/scastie/util/SbtTask.scala @@ -2,7 +2,7 @@ package org.scastie.util import org.scastie.api._ -import akka.actor.ActorRef +import org.apache.pekko.actor.ActorRef case class SbtTask(snippetId: SnippetId, inputs: SbtInputs, ip: String, login: Option[String], progressActor: ActorRef) diff --git a/utils/src/main/scala/org/scastie/util/ScalaCliTask.scala b/utils/src/main/scala/org/scastie/util/ScalaCliTask.scala index ebbbd2373..b0474bf60 100644 --- a/utils/src/main/scala/org/scastie/util/ScalaCliTask.scala +++ b/utils/src/main/scala/org/scastie/util/ScalaCliTask.scala @@ -2,7 +2,7 @@ package org.scastie.util import org.scastie.api._ -import akka.actor.ActorRef +import org.apache.pekko.actor.ActorRef case class ScalaCliTask(snippetId: SnippetId, inputs: ScalaCliInputs, ip: String, progressActor: ActorRef) case object StopRunner diff --git a/utils/src/test/scala/org/scastie/util/ProcessActorTest.scala b/utils/src/test/scala/org/scastie/util/ProcessActorTest.scala index 9eedfc8e8..f45b573e6 100644 --- a/utils/src/test/scala/org/scastie/util/ProcessActorTest.scala +++ b/utils/src/test/scala/org/scastie/util/ProcessActorTest.scala @@ -3,8 +3,8 @@ package org.scastie.util import java.io.File import java.nio.file.{Files, StandardCopyOption} -import akka.actor.{Actor, ActorRef, ActorSystem} -import akka.testkit.{ImplicitSender, TestActorRef, TestKit, TestProbe} +import org.apache.pekko.actor.{Actor, ActorRef, ActorSystem} +import org.apache.pekko.testkit.{ImplicitSender, TestActorRef, TestKit, TestProbe} import org.scastie.api.ProcessOutput import org.scastie.api.ProcessOutputType._ import org.scastie.util.ProcessActor._