diff --git a/build.sbt b/build.sbt index db57d585..9be71cf4 100644 --- a/build.sbt +++ b/build.sbt @@ -4,11 +4,11 @@ import sbtcrossproject.CrossProject Global / onChangedBuildSource := ReloadOnSourceChanges -lazy val scala3 = "3.3.0" +lazy val scala3 = "3.3.1" inThisBuild( List( - tlBaseVersion := "0.11", + tlBaseVersion := "0.12", scalaVersion := scala3, fork := true, Test / fork := false, diff --git a/docs/tutorials/3_processes.md b/docs/tutorials/3_processes.md index 1557b2b2..45448f81 100644 --- a/docs/tutorials/3_processes.md +++ b/docs/tutorials/3_processes.md @@ -6,6 +6,7 @@ import cats.implicits.* import cats.effect.IO import edomata.backend.* +import edomata.backend.eventsourcing.* import fs2.Stream import fs2.Stream.* diff --git a/modules/backend-tests/shared/src/main/scala/PersistenceSuite.scala b/modules/backend-tests/shared/src/main/scala/PersistenceSuite.scala index 39d06982..59991bd6 100644 --- a/modules/backend-tests/shared/src/main/scala/PersistenceSuite.scala +++ b/modules/backend-tests/shared/src/main/scala/PersistenceSuite.scala @@ -20,8 +20,8 @@ import cats.data.NonEmptyChain import cats.effect.IO import cats.effect.kernel.Resource import cats.implicits.* -import edomata.backend.Backend import edomata.backend.BackendError +import edomata.backend.eventsourcing.Backend import edomata.core.CommandMessage import edomata.core.Edomaton import edomata.core.ResponseD diff --git a/modules/backend/src/main/scala/eventsourcing/deprecated.scala b/modules/backend/src/main/scala/eventsourcing/deprecated.scala deleted file mode 100644 index fbf0611f..00000000 --- a/modules/backend/src/main/scala/eventsourcing/deprecated.scala +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2021 Hossein Naderi - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package edomata.backend - -@deprecated("use edomata.backend.eventsourcing instead") -type Backend[F[_], S, E, R, N] = eventsourcing.Backend[F, S, E, R, N] - -@deprecated("use edomata.backend.eventsourcing instead") -type CommandHandler[F[_], S, E, R, N] = - eventsourcing.CommandHandler[F, S, E, R, N] -@deprecated("use edomata.backend.eventsourcing instead") -val CommandHandler = eventsourcing.CommandHandler - -@deprecated("use edomata.backend.eventsourcing instead") -type JournalReader[F[_], E] = eventsourcing.JournalReader[F, E] - -@deprecated("use edomata.backend.eventsourcing instead") -type Repository[F[_], S, E, R, N] = eventsourcing.Repository[F, S, E, R, N] - -@deprecated("use edomata.backend.eventsourcing instead") -type RepositoryReader[F[_], S, E, R] = - eventsourcing.RepositoryReader[F, S, E, R] - -@deprecated("use edomata.backend.eventsourcing instead") -val RepositoryReader = eventsourcing.RepositoryReader - -@deprecated("use edomata.backend.eventsourcing instead") -type Storage[F[_], S, E, R, N] = eventsourcing.Storage[F, S, E, R, N] - -@deprecated("use edomata.backend.eventsourcing instead") -type StorageDriver[F[_], Codec[_]] = eventsourcing.StorageDriver[F, Codec] - -@deprecated("use edomata.backend.eventsourcing instead") -type AggregateState[S, E, R] = eventsourcing.AggregateState[S, E, R] - -@deprecated("use edomata.backend.eventsourcing instead") -val AggregateState = eventsourcing.AggregateState - -@deprecated("use edomata.backend.eventsourcing instead") -type CommandState[S, E, R] = eventsourcing.CommandState[S, E, R] - -@deprecated("use edomata.backend.eventsourcing instead") -type NotificationsConsumer[F[_]] = eventsourcing.NotificationsConsumer[F] - -@deprecated("use edomata.backend.eventsourcing instead") -type NotificationsPublisher[F[_]] = eventsourcing.NotificationsPublisher[F] - -@deprecated("use edomata.backend.eventsourcing instead") -type Notifications[F[_]] = eventsourcing.Notifications[F] - -@deprecated("use edomata.backend.eventsourcing instead") -type SnapshotReader[F[_], S] = eventsourcing.SnapshotReader[F, S] - -@deprecated("use edomata.backend.eventsourcing instead") -type SnapshotStore[F[_], S] = eventsourcing.SnapshotStore[F, S] - -@deprecated("use edomata.backend.eventsourcing instead") -type SnapshotPersistence[F[_], S] = eventsourcing.SnapshotPersistence[F, S] - -@deprecated("use edomata.backend.eventsourcing instead") -val SnapshotStore = eventsourcing.SnapshotStore - -@deprecated("use edomata.backend.eventsourcing instead") -type SnapshotItem[S] = eventsourcing.SnapshotItem[S] diff --git a/modules/doobie/src/main/scala/DoobieJournalReader.scala b/modules/doobie/src/main/scala/DoobieJournalReader.scala index c66b5f77..e62547c4 100644 --- a/modules/doobie/src/main/scala/DoobieJournalReader.scala +++ b/modules/doobie/src/main/scala/DoobieJournalReader.scala @@ -20,6 +20,7 @@ import _root_.doobie.Transactor import _root_.doobie.implicits.* import cats.effect.Concurrent import edomata.backend.* +import edomata.backend.eventsourcing.JournalReader import fs2.Stream private final class DoobieJournalReader[F[_]: Concurrent, E]( diff --git a/modules/doobie/src/main/scala/DoobieRepository.scala b/modules/doobie/src/main/scala/DoobieRepository.scala index 96ed25cd..e545693e 100644 --- a/modules/doobie/src/main/scala/DoobieRepository.scala +++ b/modules/doobie/src/main/scala/DoobieRepository.scala @@ -25,6 +25,7 @@ import cats.effect.kernel.Clock import cats.effect.kernel.Sync import cats.implicits.* import edomata.backend.* +import edomata.backend.eventsourcing.* import edomata.core.* import java.time.OffsetDateTime diff --git a/modules/doobie/src/test/scala/DoobieCompatibilitySuite.scala b/modules/doobie/src/test/scala/DoobieCompatibilitySuite.scala index 4e1e89c5..3723c625 100644 --- a/modules/doobie/src/test/scala/DoobieCompatibilitySuite.scala +++ b/modules/doobie/src/test/scala/DoobieCompatibilitySuite.scala @@ -21,6 +21,7 @@ import cats.effect.IO import cats.effect.kernel.Resource import cats.implicits.* import edomata.backend.* +import edomata.backend.eventsourcing.Backend import edomata.doobie.* import scodec.bits.ByteVector diff --git a/modules/skunk/src/main/scala/SkunkJournalReader.scala b/modules/skunk/src/main/scala/SkunkJournalReader.scala index 6d42ea5e..527c6b37 100644 --- a/modules/skunk/src/main/scala/SkunkJournalReader.scala +++ b/modules/skunk/src/main/scala/SkunkJournalReader.scala @@ -20,6 +20,7 @@ import _root_.skunk.* import cats.effect.Concurrent import cats.effect.kernel.Resource import edomata.backend.* +import edomata.backend.eventsourcing.JournalReader import fs2.Stream private final class SkunkJournalReader[F[_]: Concurrent, E]( diff --git a/modules/skunk/src/main/scala/SkunkRepository.scala b/modules/skunk/src/main/scala/SkunkRepository.scala index 7c6d182f..1703b900 100644 --- a/modules/skunk/src/main/scala/SkunkRepository.scala +++ b/modules/skunk/src/main/scala/SkunkRepository.scala @@ -23,8 +23,9 @@ import cats.effect.kernel.Resource import cats.effect.kernel.Sync import cats.effect.std.UUIDGen import cats.implicits.* -import edomata.backend.* +import edomata.backend.eventsourcing.* import edomata.core.* +import edomata.backend.* private final class SkunkRepository[F[_], S, E, R, N]( pool: Resource[F, Session[F]], diff --git a/modules/skunk/src/test/scala/SkunkCompatibilitySuite.scala b/modules/skunk/src/test/scala/SkunkCompatibilitySuite.scala index 978c791b..4adfde73 100644 --- a/modules/skunk/src/test/scala/SkunkCompatibilitySuite.scala +++ b/modules/skunk/src/test/scala/SkunkCompatibilitySuite.scala @@ -21,6 +21,7 @@ import cats.effect.IO import cats.effect.kernel.Resource import cats.implicits.* import edomata.backend.* +import edomata.backend.eventsourcing.Backend import edomata.skunk.* import natchez.Trace.Implicits.noop import scodec.bits.ByteVector