From b04a3b5c8637291c257335cff00f02415ae44cee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mareks=20Ramp=C4=81ns?= <8796159+mr-git@users.noreply.github.com> Date: Tue, 21 May 2024 16:04:34 +0300 Subject: [PATCH] fix 4.0.7 publishing --- build.sbt | 4 +--- .../akkaeffect/eventsourcing/Engine.scala | 18 ++++++++--------- .../akka/persistence/LocalActorRef.scala | 20 +++++++++---------- 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/build.sbt b/build.sbt index 034117e2..af0cdf1f 100644 --- a/build.sbt +++ b/build.sbt @@ -13,8 +13,6 @@ lazy val commonSettings = Seq( publishTo := Some(Resolver.evolutionReleases), versionPolicyIntention := Compatibility.BinaryCompatible, // sbt-version-policy versionScheme := Some("semver-spec"), - - /*testOptions in Test ++= Seq(Tests.Argument(TestFrameworks.ScalaTest, "-oUDNCXEHLOPQRM"))*/ libraryDependencies += compilerPlugin(`kind-projector` cross CrossVersion.full), // TODO remove after 4.0.7 is released @@ -30,7 +28,7 @@ val alias: Seq[sbt.Def.Setting[_]] = addCommandAlias("fmt", "scalafixEnable; scalafixAll; all scalafmtAll scalafmtSbt") ++ addCommandAlias( "check", - "versionPolicyCheck; scalafixEnable; scalafixAll --check; all scalafmtCheckAll scalafmtSbtCheck", + "all Compile/doc versionPolicyCheck scalafmtCheckAll scalafmtSbtCheck; scalafixEnable; scalafixAll --check", ) ++ addCommandAlias("build", "all compile test") diff --git a/eventsourcing/src/main/scala/com/evolutiongaming/akkaeffect/eventsourcing/Engine.scala b/eventsourcing/src/main/scala/com/evolutiongaming/akkaeffect/eventsourcing/Engine.scala index 53e99b28..539b6a87 100644 --- a/eventsourcing/src/main/scala/com/evolutiongaming/akkaeffect/eventsourcing/Engine.scala +++ b/eventsourcing/src/main/scala/com/evolutiongaming/akkaeffect/eventsourcing/Engine.scala @@ -292,13 +292,13 @@ object Engine { case class Wrapped(state: State[S], stopped: Boolean = false) val engine: F[Engine[F, S, E]] = for { - /** Mutable variable of [[Engine.State]] wrapped together with boolean stopped var */ + /* Mutable variable of [[Engine.State]] wrapped together with boolean stopped var */ ref <- Ref.of[F, Wrapped](Wrapped(initial)) - /** Effective state representing last persisted state of [[ref]] */ + /* Effective state representing last persisted state of [[ref]] */ eff <- Ref.of[F, State[S]](initial) - /** Effect executor that guarantee sequential execution of tasks within one key */ + /* Effect executor that guarantee sequential execution of tasks within one key */ queue <- SerParQueue.of[F, Key] - /** Latch that closes on error and continue raising the error on each execution */ + /* Latch that closes on error and continue raising the error on each execution */ close <- CloseOnError.of[F] } yield new Engine[F, S, E] { @@ -332,7 +332,7 @@ object Engine { 0.tailRecM { _ => ref.access.flatMap { case (Wrapped(state0, stopped), update) => - /** await for `load` stage to complete & run `validate` stage */ + /* await for `load` stage to complete & run `validate` stage */ val directive = for { validate <- load @@ -341,7 +341,7 @@ object Engine { directive.attempt.flatMap { - /** on error reply to user & exit loop */ + /* on error reply to user & exit loop */ case Left(error) => for { _ <- reply.complete(error.asLeft[A]) @@ -350,7 +350,7 @@ object Engine { case Right(directive) => if (stopped) { - /** if Engine already stopped then execute side effects with [[Engine.stopped]] error */ + /* if Engine already stopped then execute side effects with [[Engine.stopped]] error */ val effect = for { e <- close.error @@ -363,7 +363,7 @@ object Engine { directive.change match { case None => - /** if state not changed - execute side effects */ + /* if state not changed - execute side effects */ val effect = for { e <- close.error @@ -376,7 +376,7 @@ object Engine { } yield if (updated) ().asRight[Int] else 0.asLeft[Unit] case Some(change) => - /** if state was changed then: persist events & execute side effects */ + /* if state was changed then: persist events & execute side effects */ val state1 = State(change.state, state0.seqNr + change.events.size) update(Wrapped(state1, directive.stop)).flatMap { updated => if (updated) { diff --git a/persistence/src/main/scala/akka/persistence/LocalActorRef.scala b/persistence/src/main/scala/akka/persistence/LocalActorRef.scala index 11b2045b..15ad3717 100644 --- a/persistence/src/main/scala/akka/persistence/LocalActorRef.scala +++ b/persistence/src/main/scala/akka/persistence/LocalActorRef.scala @@ -79,16 +79,16 @@ private[persistence] object LocalActorRef { type Delay = FiniteDuration - /** If state was not updated for more than [[#timeout]] - completes [[#defer]] with failed result and exits - * tailRecM loop. - * - * Otherwise calculate [[#delay]] till next timeout and continue loop. - * - * @param delay - * time before next timeout - * @return - * exid or continue loop - */ + /* If state was not updated for more than [[#timeout]] - completes [[#defer]] with failed result and exits + * tailRecM loop. + * + * Otherwise calculate [[#delay]] till next timeout and continue loop. + * + * @param delay + * time before next timeout + * @return + * exid or continue loop + */ def failOnTimeout(delay: Delay): F[Either[Delay, Unit]] = for { _ <- F.sleep(delay)