Skip to content

Commit

Permalink
Switch to pekko (#130)
Browse files Browse the repository at this point in the history
* Fix a few typos
* Switch to Pekko 1.0.1

- Update dependencies from Akka to Pekko
- Adjust imports
- Adjust application configuration to Pekko
  • Loading branch information
eloots authored Sep 18, 2023
1 parent 8abe853 commit 751a13e
Show file tree
Hide file tree
Showing 152 changed files with 331 additions and 339 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ object CompileOptions {
}

object Versions {
lazy val akkaVer = "2.6.20"
lazy val PekkoVersion = "1.0.1"
lazy val logbackVer = "1.2.3"
lazy val mUnitVer = "0.7.26"
}

object Dependencies {

private lazy val akkaDeps = Seq(
"com.typesafe.akka" %% "akka-actor-typed",
"com.typesafe.akka" %% "akka-slf4j",
"com.typesafe.akka" %% "akka-stream").map(_ % Versions.akkaVer)
"org.apache.pekko" %% "pekko-actor-typed",
"org.apache.pekko" %% "pekko-slf4j",
"org.apache.pekko" %% "pekko-stream").map(_ % Versions.PekkoVersion)

private lazy val akkaTestkitDeps = Seq("com.typesafe.akka" %% "akka-actor-testkit-typed" % Versions.akkaVer % Test)
private lazy val akkaTestkitDeps = Seq("org.apache.pekko" %% "pekko-actor-testkit-typed" % Versions.PekkoVersion % Test)

private lazy val logbackDeps = Seq("ch.qos.logback" % "logback-classic").map(_ % Versions.logbackVer)

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.4
sbt.version=1.9.6
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
akka {
org.apache.pekko {
loggers = ["akka.event.slf4j.Slf4jLogger"]
loglevel = "INFO"
logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

package org.lunatechlabs.dotty

import akka.NotUsed
import akka.actor.typed.scaladsl.adapter.TypedActorSystemOps
import akka.actor.typed.scaladsl.{Behaviors, Routers}
import akka.actor.typed.{ActorSystem, Behavior, Terminated}
import org.apache.pekko.NotUsed
import org.apache.pekko.actor.typed.scaladsl.adapter.TypedActorSystemOps
import org.apache.pekko.actor.typed.scaladsl.{Behaviors, Routers}
import org.apache.pekko.actor.typed.{ActorSystem, Behavior, Terminated}
import org.lunatechlabs.dotty.sudoku.{SudokuProblemSender, SudokuSolver, SudokuSolverSettings}

import scala.Console.{GREEN, RESET}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.lunatechlabs.dotty.sudoku

import akka.actor.typed.scaladsl.{ActorContext, Behaviors}
import akka.actor.typed.{ActorRef, Behavior}
import org.apache.pekko.actor.typed.scaladsl.{ActorContext, Behaviors}
import org.apache.pekko.actor.typed.{ActorRef, Behavior}

object SudokuDetailProcessor {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package org.lunatechlabs.dotty.sudoku

import java.io.File

import akka.actor.typed.scaladsl.{ActorContext, Behaviors, TimerScheduler}
import akka.actor.typed.{ActorRef, Behavior}
import org.apache.pekko.actor.typed.scaladsl.{ActorContext, Behaviors, TimerScheduler}
import org.apache.pekko.actor.typed.{ActorRef, Behavior}

object SudokuProblemSender {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.lunatechlabs.dotty.sudoku

import akka.actor.typed.scaladsl.{ActorContext, Behaviors}
import akka.actor.typed.{ActorRef, Behavior}
import org.apache.pekko.actor.typed.scaladsl.{ActorContext, Behaviors}
import org.apache.pekko.actor.typed.{ActorRef, Behavior}

object SudokuProgressTracker {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.lunatechlabs.dotty.sudoku

import akka.actor.typed.receptionist.{Receptionist, ServiceKey}
import akka.actor.typed.scaladsl.{ActorContext, Behaviors, StashBuffer}
import akka.actor.typed.{ActorRef, Behavior, SupervisorStrategy}
import org.apache.pekko.actor.typed.receptionist.{Receptionist, ServiceKey}
import org.apache.pekko.actor.typed.scaladsl.{ActorContext, Behaviors, StashBuffer}
import org.apache.pekko.actor.typed.{ActorRef, Behavior, SupervisorStrategy}

import scala.concurrent.duration._

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.lunatechlabs.dotty.sudoku

import SudokuDetailProcessor.{Update, SudokuDetailUnchanged, BlockUpdate}
import akka.actor.testkit.typed.scaladsl.ActorTestKit
import org.apache.pekko.actor.testkit.typed.scaladsl.ActorTestKit
import java.nio.file._

class SudokuDetailProcessorSuite extends munit.FunSuite with SudokuTestHelpers {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Global / onChangedBuildSource := ReloadOnSourceChanges

lazy val `moving-from-scala-2-to-scala-3` =
(project in file(".")).settings(
scalaVersion := "3.3.0",
scalaVersion := "3.3.1",
Compile / scalacOptions ++= CompileOptions.compileOptions,
libraryDependencies ++= Dependencies.dependencies,
testFrameworks += new TestFramework("munit.Framework"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ object CompileOptions {
}

object Versions {
lazy val akkaVer = "2.6.20"
lazy val PekkoVersion = "1.0.1"
lazy val logbackVer = "1.2.3"
lazy val mUnitVer = "0.7.26"
}

object Dependencies {

private lazy val akkaDeps = Seq(
"com.typesafe.akka" %% "akka-actor-typed",
"com.typesafe.akka" %% "akka-slf4j",
"com.typesafe.akka" %% "akka-stream").map(_ % Versions.akkaVer)
"org.apache.pekko" %% "pekko-actor-typed",
"org.apache.pekko" %% "pekko-slf4j",
"org.apache.pekko" %% "pekko-stream").map(_ % Versions.PekkoVersion)

private lazy val akkaTestkitDeps = Seq("com.typesafe.akka" %% "akka-actor-testkit-typed" % Versions.akkaVer % Test)
private lazy val akkaTestkitDeps = Seq("org.apache.pekko" %% "pekko-actor-testkit-typed" % Versions.PekkoVersion % Test)

private lazy val logbackDeps = Seq("ch.qos.logback" % "logback-classic").map(_ % Versions.logbackVer)

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.4
sbt.version=1.9.6
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
akka {
org.apache.pekko {
loggers = ["akka.event.slf4j.Slf4jLogger"]
loglevel = "INFO"
logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

package org.lunatechlabs.dotty

import akka.NotUsed
import akka.actor.typed.scaladsl.adapter.TypedActorSystemOps
import akka.actor.typed.scaladsl.{Behaviors, Routers}
import akka.actor.typed.{ActorSystem, Behavior, Terminated}
import org.apache.pekko.NotUsed
import org.apache.pekko.actor.typed.scaladsl.adapter.TypedActorSystemOps
import org.apache.pekko.actor.typed.scaladsl.{Behaviors, Routers}
import org.apache.pekko.actor.typed.{ActorSystem, Behavior, Terminated}
import org.lunatechlabs.dotty.sudoku.{SudokuProblemSender, SudokuSolver, SudokuSolverSettings}

import scala.Console.{GREEN, RESET}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.lunatechlabs.dotty.sudoku

import akka.actor.typed.scaladsl.{ActorContext, Behaviors}
import akka.actor.typed.{ActorRef, Behavior}
import org.apache.pekko.actor.typed.scaladsl.{ActorContext, Behaviors}
import org.apache.pekko.actor.typed.{ActorRef, Behavior}

object SudokuDetailProcessor {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package org.lunatechlabs.dotty.sudoku

import java.io.File

import akka.actor.typed.scaladsl.{ActorContext, Behaviors, TimerScheduler}
import akka.actor.typed.{ActorRef, Behavior}
import org.apache.pekko.actor.typed.scaladsl.{ActorContext, Behaviors, TimerScheduler}
import org.apache.pekko.actor.typed.{ActorRef, Behavior}

object SudokuProblemSender {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.lunatechlabs.dotty.sudoku

import akka.actor.typed.scaladsl.{ActorContext, Behaviors}
import akka.actor.typed.{ActorRef, Behavior}
import org.apache.pekko.actor.typed.scaladsl.{ActorContext, Behaviors}
import org.apache.pekko.actor.typed.{ActorRef, Behavior}

object SudokuProgressTracker {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.lunatechlabs.dotty.sudoku

import akka.actor.typed.receptionist.{Receptionist, ServiceKey}
import akka.actor.typed.scaladsl.{ActorContext, Behaviors, StashBuffer}
import akka.actor.typed.{ActorRef, Behavior, SupervisorStrategy}
import org.apache.pekko.actor.typed.receptionist.{Receptionist, ServiceKey}
import org.apache.pekko.actor.typed.scaladsl.{ActorContext, Behaviors, StashBuffer}
import org.apache.pekko.actor.typed.{ActorRef, Behavior, SupervisorStrategy}

import scala.concurrent.duration.*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.lunatechlabs.dotty.sudoku

import SudokuDetailProcessor.{Update, SudokuDetailUnchanged, BlockUpdate}
import akka.actor.testkit.typed.scaladsl.ActorTestKit
import org.apache.pekko.actor.testkit.typed.scaladsl.ActorTestKit
import java.nio.file.*

class SudokuDetailProcessorSuite extends munit.FunSuite with SudokuTestHelpers {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Global / onChangedBuildSource := ReloadOnSourceChanges

lazy val `moving-from-scala-2-to-scala-3` =
(project in file(".")).settings(
scalaVersion := "3.3.0",
scalaVersion := "3.3.1",
Compile / scalacOptions ++= CompileOptions.compileOptions,
libraryDependencies ++= Dependencies.dependencies,
testFrameworks += new TestFramework("munit.Framework"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ object CompileOptions {
}

object Versions {
lazy val akkaVer = "2.6.20"
lazy val PekkoVersion = "1.0.1"
lazy val logbackVer = "1.2.3"
lazy val mUnitVer = "0.7.26"
}

object Dependencies {

private lazy val akkaDeps = Seq(
"com.typesafe.akka" %% "akka-actor-typed",
"com.typesafe.akka" %% "akka-slf4j",
"com.typesafe.akka" %% "akka-stream").map(_ % Versions.akkaVer)
"org.apache.pekko" %% "pekko-actor-typed",
"org.apache.pekko" %% "pekko-slf4j",
"org.apache.pekko" %% "pekko-stream").map(_ % Versions.PekkoVersion)

private lazy val akkaTestkitDeps = Seq("com.typesafe.akka" %% "akka-actor-testkit-typed" % Versions.akkaVer % Test)
private lazy val akkaTestkitDeps = Seq("org.apache.pekko" %% "pekko-actor-testkit-typed" % Versions.PekkoVersion % Test)

private lazy val logbackDeps = Seq("ch.qos.logback" % "logback-classic").map(_ % Versions.logbackVer)

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.4
sbt.version=1.9.6
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
akka {
org.apache.pekko {
loggers = ["akka.event.slf4j.Slf4jLogger"]
loglevel = "INFO"
logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

package org.lunatechlabs.dotty

import akka.NotUsed
import akka.actor.typed.scaladsl.adapter.TypedActorSystemOps
import akka.actor.typed.scaladsl.{Behaviors, Routers}
import akka.actor.typed.{ActorSystem, Behavior, Terminated}
import org.apache.pekko.NotUsed
import org.apache.pekko.actor.typed.scaladsl.adapter.TypedActorSystemOps
import org.apache.pekko.actor.typed.scaladsl.{Behaviors, Routers}
import org.apache.pekko.actor.typed.{ActorSystem, Behavior, Terminated}
import org.lunatechlabs.dotty.sudoku.{SudokuProblemSender, SudokuSolver, SudokuSolverSettings}

import scala.Console.{GREEN, RESET}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.lunatechlabs.dotty.sudoku

import akka.actor.typed.scaladsl.{ActorContext, Behaviors}
import akka.actor.typed.{ActorRef, Behavior}
import org.apache.pekko.actor.typed.scaladsl.{ActorContext, Behaviors}
import org.apache.pekko.actor.typed.{ActorRef, Behavior}

object SudokuDetailProcessor:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package org.lunatechlabs.dotty.sudoku

import java.io.File

import akka.actor.typed.scaladsl.{ActorContext, Behaviors, TimerScheduler}
import akka.actor.typed.{ActorRef, Behavior}
import org.apache.pekko.actor.typed.scaladsl.{ActorContext, Behaviors, TimerScheduler}
import org.apache.pekko.actor.typed.{ActorRef, Behavior}

object SudokuProblemSender:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.lunatechlabs.dotty.sudoku

import akka.actor.typed.scaladsl.{ActorContext, Behaviors}
import akka.actor.typed.{ActorRef, Behavior}
import org.apache.pekko.actor.typed.scaladsl.{ActorContext, Behaviors}
import org.apache.pekko.actor.typed.{ActorRef, Behavior}

object SudokuProgressTracker:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.lunatechlabs.dotty.sudoku

import akka.actor.typed.receptionist.{Receptionist, ServiceKey}
import akka.actor.typed.scaladsl.{ActorContext, Behaviors, StashBuffer}
import akka.actor.typed.{ActorRef, Behavior, SupervisorStrategy}
import org.apache.pekko.actor.typed.receptionist.{Receptionist, ServiceKey}
import org.apache.pekko.actor.typed.scaladsl.{ActorContext, Behaviors, StashBuffer}
import org.apache.pekko.actor.typed.{ActorRef, Behavior, SupervisorStrategy}

import scala.concurrent.duration.*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.lunatechlabs.dotty.sudoku

import SudokuDetailProcessor.{Update, SudokuDetailUnchanged, BlockUpdate}
import akka.actor.testkit.typed.scaladsl.ActorTestKit
import org.apache.pekko.actor.testkit.typed.scaladsl.ActorTestKit
import java.nio.file.*

class SudokuDetailProcessorSuite extends munit.FunSuite with SudokuTestHelpers:
Expand Down
2 changes: 1 addition & 1 deletion exercises/exercise_003_top_level_definitions/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Global / onChangedBuildSource := ReloadOnSourceChanges

lazy val `moving-from-scala-2-to-scala-3` =
(project in file(".")).settings(
scalaVersion := "3.3.0",
scalaVersion := "3.3.1",
Compile / scalacOptions ++= CompileOptions.compileOptions,
libraryDependencies ++= Dependencies.dependencies,
testFrameworks += new TestFramework("munit.Framework"))
Expand Down
10 changes: 5 additions & 5 deletions exercises/exercise_003_top_level_definitions/project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ object CompileOptions {
}

object Versions {
lazy val akkaVer = "2.6.20"
lazy val PekkoVersion = "1.0.1"
lazy val logbackVer = "1.2.3"
lazy val mUnitVer = "0.7.26"
}

object Dependencies {

private lazy val akkaDeps = Seq(
"com.typesafe.akka" %% "akka-actor-typed",
"com.typesafe.akka" %% "akka-slf4j",
"com.typesafe.akka" %% "akka-stream").map(_ % Versions.akkaVer)
"org.apache.pekko" %% "pekko-actor-typed",
"org.apache.pekko" %% "pekko-slf4j",
"org.apache.pekko" %% "pekko-stream").map(_ % Versions.PekkoVersion)

private lazy val akkaTestkitDeps = Seq("com.typesafe.akka" %% "akka-actor-testkit-typed" % Versions.akkaVer % Test)
private lazy val akkaTestkitDeps = Seq("org.apache.pekko" %% "pekko-actor-testkit-typed" % Versions.PekkoVersion % Test)

private lazy val logbackDeps = Seq("ch.qos.logback" % "logback-classic").map(_ % Versions.logbackVer)

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.4
sbt.version=1.9.6
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
akka {
org.apache.pekko {
loggers = ["akka.event.slf4j.Slf4jLogger"]
loglevel = "INFO"
logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

package org.lunatechlabs.dotty

import akka.NotUsed
import akka.actor.typed.scaladsl.adapter.TypedActorSystemOps
import akka.actor.typed.scaladsl.{Behaviors, Routers}
import akka.actor.typed.{ActorSystem, Behavior, Terminated}
import org.apache.pekko.NotUsed
import org.apache.pekko.actor.typed.scaladsl.adapter.TypedActorSystemOps
import org.apache.pekko.actor.typed.scaladsl.{Behaviors, Routers}
import org.apache.pekko.actor.typed.{ActorSystem, Behavior, Terminated}
import org.lunatechlabs.dotty.sudoku.{SudokuProblemSender, SudokuSolver, SudokuSolverSettings}
import scala.io.StdIn
import scala.Console.{GREEN, RESET}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.lunatechlabs.dotty.sudoku

import akka.actor.typed.scaladsl.{ActorContext, Behaviors}
import akka.actor.typed.{ActorRef, Behavior}
import org.apache.pekko.actor.typed.scaladsl.{ActorContext, Behaviors}
import org.apache.pekko.actor.typed.{ActorRef, Behavior}

object SudokuDetailProcessor:

Expand Down
Loading

0 comments on commit 751a13e

Please sign in to comment.