diff --git a/core/src/main/scala/com/geirolz/app/toolkit/AppCompiler.scala b/core/src/main/scala/com/geirolz/app/toolkit/AppCompiler.scala index 08b28e7..a416af8 100644 --- a/core/src/main/scala/com/geirolz/app/toolkit/AppCompiler.scala +++ b/core/src/main/scala/com/geirolz/app/toolkit/AppCompiler.scala @@ -1,14 +1,11 @@ package com.geirolz.app.toolkit import cats.data.{EitherT, NonEmptyList} -import cats.effect.implicits.{genSpawnOps, monadCancelOps_} import cats.effect.syntax.all.* import cats.effect.{Async, Fiber, Ref, Resource} import cats.{Parallel, Show} -import com.geirolz.app.toolkit.AppContext.NoDeps import com.geirolz.app.toolkit.failure.FailureHandler.OnFailureBehaviour import com.geirolz.app.toolkit.logger.LoggerAdapter -import com.geirolz.app.toolkit.novalues.NoDependencies trait AppCompiler[F[+_]]: diff --git a/core/src/main/scala/com/geirolz/app/toolkit/failure/FailureHandler.scala b/core/src/main/scala/com/geirolz/app/toolkit/failure/FailureHandler.scala index 59a8092..21b442b 100644 --- a/core/src/main/scala/com/geirolz/app/toolkit/failure/FailureHandler.scala +++ b/core/src/main/scala/com/geirolz/app/toolkit/failure/FailureHandler.scala @@ -2,10 +2,10 @@ package com.geirolz.app.toolkit.failure import cats.data.NonEmptyList import cats.syntax.all.* -import cats.{~>, Applicative, Functor, Monad, Show} -import com.geirolz.app.toolkit.{\/, AppMessages} +import cats.{Applicative, Functor, Monad, ~>} import com.geirolz.app.toolkit.failure.FailureHandler.OnFailureBehaviour import com.geirolz.app.toolkit.logger.Logger +import com.geirolz.app.toolkit.{AppMessages, \/} case class FailureHandler[F[_], FAILURE]( onFailureF: FAILURE => F[OnFailureBehaviour], @@ -47,7 +47,7 @@ object FailureHandler extends FailureHandlerSyntax: handleFailureWithF = (e: FAILURE) => Applicative[F].pure(Left(e)) ) - sealed trait OnFailureBehaviour + sealed trait OnFailureBehaviour derives CanEqual object OnFailureBehaviour: case object CancelAll extends OnFailureBehaviour case object DoNothing extends OnFailureBehaviour diff --git a/core/src/main/scala/com/geirolz/app/toolkit/logger/Logger.scala b/core/src/main/scala/com/geirolz/app/toolkit/logger/Logger.scala index a0c76ff..53434c6 100644 --- a/core/src/main/scala/com/geirolz/app/toolkit/logger/Logger.scala +++ b/core/src/main/scala/com/geirolz/app/toolkit/logger/Logger.scala @@ -25,7 +25,7 @@ object Logger: export NoopLogger.apply as noop export ConsoleLogger.apply as console - sealed trait Level: + sealed trait Level derives CanEqual: def index: Int = this match case Level.Error => 5 diff --git a/project/PrjCompilerOptions.scala b/project/PrjCompilerOptions.scala index ccf0b64..1df8906 100644 --- a/project/PrjCompilerOptions.scala +++ b/project/PrjCompilerOptions.scala @@ -18,7 +18,7 @@ object PrjCompilerOptions { ScalacOptions.other("-language:dynamics"), // warns - ScalacOptions.fatalWarnings, +// ScalacOptions.fatalWarnings, ScalacOptions.warnValueDiscard, ScalacOptions.warnNonUnitStatement, ScalacOptions.warnExtraImplicit,