Skip to content

Commit

Permalink
fix 4.0.7 publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-git committed May 21, 2024
1 parent d208610 commit b04a3b5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 22 deletions.
4 changes: 1 addition & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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] {

Expand Down Expand Up @@ -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
Expand All @@ -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])
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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) {
Expand Down
20 changes: 10 additions & 10 deletions persistence/src/main/scala/akka/persistence/LocalActorRef.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b04a3b5

Please sign in to comment.