From 8e21f26bc86ab874f52f41c123921384821e844f Mon Sep 17 00:00:00 2001 From: Gabriel Volpe Date: Sun, 3 Sep 2023 23:15:40 +0200 Subject: [PATCH] update sbt-tpolecat to 0.4.4 (remove unused imports) --- .../main/scala/trading/alerts/Engine.scala | 2 -- .../src/main/scala/trading/alerts/Main.scala | 8 +------- .../main/scala/trading/core/TradeEngine.scala | 2 -- .../main/scala/trading/domain/Symbol.scala | 1 - .../scala/trading/domain/SymbolSuite.scala | 1 - .../test/scala/trading/ws/WsCodecSuite.scala | 1 - .../src/main/scala/trading/Newtype.scala | 9 +-------- .../trading/commands/ForecastCommand.scala | 2 +- .../trading/commands/SwitchCommand.scala | 2 +- .../scala/trading/commands/TradeCommand.scala | 2 +- .../src/main/scala/trading/domain.scala | 1 - .../main/scala/trading/domain/AlertType.scala | 2 +- .../trading/domain/OrphanInstances.scala | 2 -- .../scala/trading/domain/TradingStatus.scala | 2 +- .../scala/trading/domain/VoteResult.scala | 2 +- .../scala/trading/events/AuthorEvent.scala | 1 - .../scala/trading/events/ForecastEvent.scala | 1 - .../scala/trading/events/SwitchEvent.scala | 3 +-- .../scala/trading/events/TradeEvent.scala | 2 +- .../src/main/scala/trading/feed/Feed.scala | 2 ++ .../scala/trading/feed/ForecastFeed.scala | 20 +------------------ .../src/main/scala/trading/feed/Main.scala | 1 - .../main/scala/trading/forecasts/Config.scala | 2 -- .../main/scala/trading/forecasts/Engine.scala | 5 ++--- .../main/scala/trading/forecasts/Main.scala | 3 +-- .../trading/forecasts/VotesHandler.scala | 2 -- .../trading/forecasts/cdc/OutboxHandler.scala | 2 -- .../trading/forecasts/store/AuthorStore.scala | 2 -- .../scala/trading/forecasts/store/DB.scala | 1 - .../trading/forecasts/store/DoobieTx.scala | 1 - .../forecasts/store/ForecastStore.scala | 2 -- .../scala/trading/forecasts/EngineSuite.scala | 3 --- .../trading/forecasts/VotesHandlerSuite.scala | 4 ---- .../main/scala/trading/lib/Compaction.scala | 2 +- .../src/main/scala/trading/lib/Consumer.scala | 3 --- .../src/main/scala/trading/lib/DistLock.scala | 1 - .../src/main/scala/trading/lib/Producer.scala | 5 ++--- .../lib/src/main/scala/trading/lib/Txn.scala | 2 -- .../main/scala/trading/processor/Engine.scala | 1 - .../main/scala/trading/processor/Main.scala | 7 +------ .../scala/trading/processor/EngineSuite.scala | 2 +- .../main/scala/trading/snapshots/Main.scala | 2 +- .../scala/trading/snapshots/EngineSuite.scala | 4 ---- .../src/main/scala/trading/trace/Config.scala | 2 -- .../src/main/scala/trading/trace/Main.scala | 3 +-- .../scala/trading/trace/fsm/forecasting.scala | 9 ++------- .../scala/trading/trace/fsm/trading.scala | 4 +--- .../trading/trace/fsm/TradingFSMSuite.scala | 2 +- .../scala/trading/client/Subscriptions.scala | 2 -- .../main/scala/trading/client/Update.scala | 1 - .../main/scala/trading/ws/WsConnections.scala | 1 - .../src/main/scala/trading/ws/WsRoutes.scala | 2 +- .../test/scala/trading/ws/HandlerSuite.scala | 5 ++--- .../src/main/scala/demo/DoobieTxDemo.scala | 6 ------ .../main/scala/demo/EffectfulContext.scala | 3 +-- .../src/main/scala/demo/ErrorLifting.scala | 2 ++ .../src/main/scala/demo/PulsarCDC.scala | 5 +---- .../src/main/scala/demo/RefinedDemo.scala | 3 --- .../src/main/scala/demo/tracer/TraceApp.scala | 7 ++----- .../main/scala/demo/tracer/db/UsersDB.scala | 2 +- .../src/main/scala/demo/tracer/syntax.scala | 7 +++---- .../test/scala/demo/dedup/ConflictSuite.scala | 1 - project/plugins.sbt | 2 +- 63 files changed, 41 insertions(+), 153 deletions(-) diff --git a/modules/alerts/src/main/scala/trading/alerts/Engine.scala b/modules/alerts/src/main/scala/trading/alerts/Engine.scala index 4784640a..b7a70366 100644 --- a/modules/alerts/src/main/scala/trading/alerts/Engine.scala +++ b/modules/alerts/src/main/scala/trading/alerts/Engine.scala @@ -1,10 +1,8 @@ package trading.alerts -import trading.commands.TradeCommand import trading.core.TradeEngine import trading.domain.Alert.{ TradeAlert, TradeUpdate } import trading.domain.AlertType.* -import trading.domain.TradingStatus.* import trading.domain.* import trading.events.* import trading.lib.* diff --git a/modules/alerts/src/main/scala/trading/alerts/Main.scala b/modules/alerts/src/main/scala/trading/alerts/Main.scala index db4616a9..a713f3f1 100644 --- a/modules/alerts/src/main/scala/trading/alerts/Main.scala +++ b/modules/alerts/src/main/scala/trading/alerts/Main.scala @@ -10,13 +10,7 @@ import trading.state.TradeState import cats.effect.* import cats.syntax.all.* -import dev.profunktor.pulsar.{ - Consumer as PulsarConsumer, - Producer as PulsarProducer, - Pulsar, - SeqIdMaker, - Subscription -} +import dev.profunktor.pulsar.{ Consumer as PulsarConsumer, Producer as PulsarProducer, Pulsar, Subscription } import fs2.Stream object Main extends IOApp.Simple: diff --git a/modules/core/src/main/scala/trading/core/TradeEngine.scala b/modules/core/src/main/scala/trading/core/TradeEngine.scala index c3615644..3f7a3131 100644 --- a/modules/core/src/main/scala/trading/core/TradeEngine.scala +++ b/modules/core/src/main/scala/trading/core/TradeEngine.scala @@ -11,8 +11,6 @@ import trading.events.TradeEvent.{ CommandExecuted, CommandRejected } import trading.lib.FSM import trading.state.TradeState -import cats.Id - object TradeEngine: // Event generation and trading switch val fsm = FSM.id[TradeState, TradeCommand | SwitchCommand, (EventId, Timestamp) => TradeEvent | SwitchEvent] { diff --git a/modules/domain/jvm/src/main/scala/trading/domain/Symbol.scala b/modules/domain/jvm/src/main/scala/trading/domain/Symbol.scala index 4cc65fb0..c70c7e8c 100644 --- a/modules/domain/jvm/src/main/scala/trading/domain/Symbol.scala +++ b/modules/domain/jvm/src/main/scala/trading/domain/Symbol.scala @@ -3,7 +3,6 @@ package trading.domain import trading.Newtype import cats.* -import cats.derived.* import io.circe.* import io.github.iltotore.iron.* import io.github.iltotore.iron.cats.given diff --git a/modules/domain/jvm/src/test/scala/trading/domain/SymbolSuite.scala b/modules/domain/jvm/src/test/scala/trading/domain/SymbolSuite.scala index 5546ee39..5541a208 100644 --- a/modules/domain/jvm/src/test/scala/trading/domain/SymbolSuite.scala +++ b/modules/domain/jvm/src/test/scala/trading/domain/SymbolSuite.scala @@ -2,7 +2,6 @@ package trading.domain import trading.domain.* import trading.domain.arbitraries.given -import trading.domain.cogen.given import cats.kernel.laws.discipline.MonoidTests import weaver.FunSuite diff --git a/modules/domain/jvm/src/test/scala/trading/ws/WsCodecSuite.scala b/modules/domain/jvm/src/test/scala/trading/ws/WsCodecSuite.scala index f9e8bafb..086a937d 100644 --- a/modules/domain/jvm/src/test/scala/trading/ws/WsCodecSuite.scala +++ b/modules/domain/jvm/src/test/scala/trading/ws/WsCodecSuite.scala @@ -4,7 +4,6 @@ import trading.domain.* import trading.domain.generators.* import cats.effect.IO -import cats.syntax.all.* import io.circe.parser.decode as jsonDecode import io.circe.syntax.* import org.scalacheck.Gen diff --git a/modules/domain/shared/src/main/scala/trading/Newtype.scala b/modules/domain/shared/src/main/scala/trading/Newtype.scala index 2eeaf30d..68765162 100644 --- a/modules/domain/shared/src/main/scala/trading/Newtype.scala +++ b/modules/domain/shared/src/main/scala/trading/Newtype.scala @@ -2,8 +2,6 @@ package trading import java.util.UUID -import trading.domain.OrphanInstances.given - import cats.{ Eq, Order, Show } import io.circe.{ Decoder, Encoder } import monocle.Iso @@ -46,12 +44,7 @@ abstract class IdNewtype extends Newtype[UUID]: given IsUUID[Type] = derive[IsUUID] def unsafeFrom(str: String): Type = apply(UUID.fromString(str)) -abstract class NumNewtype[A](using - eqv: Eq[A], - ord: Order[A], - shw: Show[A], - enc: Encoder[A], - dec: Decoder[A], +abstract class NumNewtype[A: Decoder: Encoder: Eq: Order: Show](using num: Numeric[A] ) extends Newtype[A]: diff --git a/modules/domain/shared/src/main/scala/trading/commands/ForecastCommand.scala b/modules/domain/shared/src/main/scala/trading/commands/ForecastCommand.scala index 55f6dddd..fe2ebe23 100644 --- a/modules/domain/shared/src/main/scala/trading/commands/ForecastCommand.scala +++ b/modules/domain/shared/src/main/scala/trading/commands/ForecastCommand.scala @@ -1,6 +1,6 @@ package trading.commands -import trading.domain.{ *, given } +import trading.domain.* import cats.{ Applicative, Eq, Show } import cats.derived.* diff --git a/modules/domain/shared/src/main/scala/trading/commands/SwitchCommand.scala b/modules/domain/shared/src/main/scala/trading/commands/SwitchCommand.scala index f04bfc6d..4ec88618 100644 --- a/modules/domain/shared/src/main/scala/trading/commands/SwitchCommand.scala +++ b/modules/domain/shared/src/main/scala/trading/commands/SwitchCommand.scala @@ -1,6 +1,6 @@ package trading.commands -import trading.domain.{ *, given } +import trading.domain.* import cats.{ Applicative, Eq, Show } import cats.derived.* diff --git a/modules/domain/shared/src/main/scala/trading/commands/TradeCommand.scala b/modules/domain/shared/src/main/scala/trading/commands/TradeCommand.scala index c6a8c9c0..1dca8594 100644 --- a/modules/domain/shared/src/main/scala/trading/commands/TradeCommand.scala +++ b/modules/domain/shared/src/main/scala/trading/commands/TradeCommand.scala @@ -1,6 +1,6 @@ package trading.commands -import trading.domain.{ *, given } +import trading.domain.* import cats.{ Applicative, Eq, Show } import cats.derived.* diff --git a/modules/domain/shared/src/main/scala/trading/domain.scala b/modules/domain/shared/src/main/scala/trading/domain.scala index 52fc393d..d5afe496 100644 --- a/modules/domain/shared/src/main/scala/trading/domain.scala +++ b/modules/domain/shared/src/main/scala/trading/domain.scala @@ -1,7 +1,6 @@ package trading.domain import java.time.Instant -import java.util.UUID import scala.concurrent.duration.FiniteDuration diff --git a/modules/domain/shared/src/main/scala/trading/domain/AlertType.scala b/modules/domain/shared/src/main/scala/trading/domain/AlertType.scala index 47ab29dd..80458edd 100644 --- a/modules/domain/shared/src/main/scala/trading/domain/AlertType.scala +++ b/modules/domain/shared/src/main/scala/trading/domain/AlertType.scala @@ -3,7 +3,7 @@ package trading.domain import cats.{ Eq, Show } import cats.derived.* import cats.syntax.all.* -import io.circe.{ Decoder, Encoder, Json } +import io.circe.{ Decoder, Encoder } enum AlertType derives Eq, Show: case StrongBuy, StrongSell, Neutral, Buy, Sell diff --git a/modules/domain/shared/src/main/scala/trading/domain/OrphanInstances.scala b/modules/domain/shared/src/main/scala/trading/domain/OrphanInstances.scala index 6bb032bc..5ac37015 100644 --- a/modules/domain/shared/src/main/scala/trading/domain/OrphanInstances.scala +++ b/modules/domain/shared/src/main/scala/trading/domain/OrphanInstances.scala @@ -1,13 +1,11 @@ package trading.domain import java.time.Instant -import java.util.UUID import scala.concurrent.duration.{ Duration, FiniteDuration } import cats.* import cats.syntax.all.* -import com.comcast.ip4s.* import io.circe.{ Decoder, Encoder } object OrphanInstances: diff --git a/modules/domain/shared/src/main/scala/trading/domain/TradingStatus.scala b/modules/domain/shared/src/main/scala/trading/domain/TradingStatus.scala index 5deaa4f3..4224c471 100644 --- a/modules/domain/shared/src/main/scala/trading/domain/TradingStatus.scala +++ b/modules/domain/shared/src/main/scala/trading/domain/TradingStatus.scala @@ -3,7 +3,7 @@ package trading.domain import cats.{ Eq, Show } import cats.derived.* import cats.syntax.all.* -import io.circe.{ Decoder, Encoder, Json } +import io.circe.{ Decoder, Encoder } enum TradingStatus derives Eq, Show: case On, Off diff --git a/modules/domain/shared/src/main/scala/trading/domain/VoteResult.scala b/modules/domain/shared/src/main/scala/trading/domain/VoteResult.scala index 68e8c078..532c7612 100644 --- a/modules/domain/shared/src/main/scala/trading/domain/VoteResult.scala +++ b/modules/domain/shared/src/main/scala/trading/domain/VoteResult.scala @@ -3,7 +3,7 @@ package trading.domain import cats.{ Eq, Show } import cats.derived.* import cats.syntax.all.* -import io.circe.{ Decoder, Encoder, Json } +import io.circe.{ Decoder, Encoder } enum VoteResult derives Eq, Show: case Up, Down diff --git a/modules/domain/shared/src/main/scala/trading/events/AuthorEvent.scala b/modules/domain/shared/src/main/scala/trading/events/AuthorEvent.scala index 15a52d90..7bf9e776 100644 --- a/modules/domain/shared/src/main/scala/trading/events/AuthorEvent.scala +++ b/modules/domain/shared/src/main/scala/trading/events/AuthorEvent.scala @@ -1,6 +1,5 @@ package trading.events -import trading.commands.ForecastCommand import trading.domain.* import io.circe.Codec diff --git a/modules/domain/shared/src/main/scala/trading/events/ForecastEvent.scala b/modules/domain/shared/src/main/scala/trading/events/ForecastEvent.scala index 2d1bb4ad..f5e961e8 100644 --- a/modules/domain/shared/src/main/scala/trading/events/ForecastEvent.scala +++ b/modules/domain/shared/src/main/scala/trading/events/ForecastEvent.scala @@ -1,6 +1,5 @@ package trading.events -import trading.commands.ForecastCommand import trading.domain.* import io.circe.Codec diff --git a/modules/domain/shared/src/main/scala/trading/events/SwitchEvent.scala b/modules/domain/shared/src/main/scala/trading/events/SwitchEvent.scala index fbc9cb22..26a91d95 100644 --- a/modules/domain/shared/src/main/scala/trading/events/SwitchEvent.scala +++ b/modules/domain/shared/src/main/scala/trading/events/SwitchEvent.scala @@ -1,7 +1,6 @@ package trading.events -import trading.commands.SwitchCommand -import trading.domain.{ *, given } +import trading.domain.* import cats.{ Applicative, Show } import cats.derived.* diff --git a/modules/domain/shared/src/main/scala/trading/events/TradeEvent.scala b/modules/domain/shared/src/main/scala/trading/events/TradeEvent.scala index 229757f2..b48c7975 100644 --- a/modules/domain/shared/src/main/scala/trading/events/TradeEvent.scala +++ b/modules/domain/shared/src/main/scala/trading/events/TradeEvent.scala @@ -1,7 +1,7 @@ package trading.events import trading.commands.TradeCommand -import trading.domain.{ *, given } +import trading.domain.* import cats.{ Applicative, Eq, Show } import cats.derived.* diff --git a/modules/feed/src/main/scala/trading/feed/Feed.scala b/modules/feed/src/main/scala/trading/feed/Feed.scala index 713c4397..025b1f99 100644 --- a/modules/feed/src/main/scala/trading/feed/Feed.scala +++ b/modules/feed/src/main/scala/trading/feed/Feed.scala @@ -1,6 +1,7 @@ package trading.feed import scala.concurrent.duration.* +import scala.annotation.nowarn import trading.commands.* import trading.domain.* @@ -50,6 +51,7 @@ object Feed: // This implementation is quite random, generating a lot of AuthorNotFound errors downstream // Prefer the ForecastFeed implementation (running directly from Main) for a more realistic simulation + @nowarn val forecasting: F[Unit] = forecastCommandListGen.replicateA(2).flatten.traverse_ { cmd => import ForecastCommand.* diff --git a/modules/feed/src/main/scala/trading/feed/ForecastFeed.scala b/modules/feed/src/main/scala/trading/feed/ForecastFeed.scala index e5b0f72b..a062a27c 100644 --- a/modules/feed/src/main/scala/trading/feed/ForecastFeed.scala +++ b/modules/feed/src/main/scala/trading/feed/ForecastFeed.scala @@ -1,38 +1,20 @@ package trading.feed -import java.time.Instant import java.util.UUID import scala.concurrent.duration.* import trading.commands.ForecastCommand -import trading.core.AppTopic import trading.domain.* import trading.domain.generators.* import trading.events.* -import trading.lib.{ *, given } +import trading.lib.* import cats.effect.* -import cats.effect.syntax.all.* import cats.syntax.all.* -import dev.profunktor.pulsar.{ Producer as PulsarProducer, Pulsar, Subscription, Topic } import fs2.Stream object ForecastFeed: - private val sub = - Subscription.Builder - .withName("forecasts-gen") - .withType(Subscription.Type.Exclusive) - .build - - private def settings[A: Shard](name: String) = - PulsarProducer - .Settings[IO, A]() - .withDeduplication - .withName(s"forecast-gen-$name-command") - .withShardKey(Shard[A].key) - .some - // The randomness of randomUUID() seems better than that of Gen.uuid def makeCmdId = CommandId(UUID.randomUUID()) diff --git a/modules/feed/src/main/scala/trading/feed/Main.scala b/modules/feed/src/main/scala/trading/feed/Main.scala index ac62120c..37e13051 100644 --- a/modules/feed/src/main/scala/trading/feed/Main.scala +++ b/modules/feed/src/main/scala/trading/feed/Main.scala @@ -3,7 +3,6 @@ package trading.feed import trading.commands.* import trading.core.AppTopic import trading.core.http.Ember -import trading.domain.CommandId import trading.events.* import trading.lib.* diff --git a/modules/forecasts/src/main/scala/trading/forecasts/Config.scala b/modules/forecasts/src/main/scala/trading/forecasts/Config.scala index 6bd63309..9932f608 100644 --- a/modules/forecasts/src/main/scala/trading/forecasts/Config.scala +++ b/modules/forecasts/src/main/scala/trading/forecasts/Config.scala @@ -1,7 +1,5 @@ package trading.forecasts -import scala.concurrent.duration.* - import trading.domain.{ *, given } import cats.effect.kernel.Async diff --git a/modules/forecasts/src/main/scala/trading/forecasts/Engine.scala b/modules/forecasts/src/main/scala/trading/forecasts/Engine.scala index a53299a1..a48e161a 100644 --- a/modules/forecasts/src/main/scala/trading/forecasts/Engine.scala +++ b/modules/forecasts/src/main/scala/trading/forecasts/Engine.scala @@ -5,11 +5,10 @@ import trading.domain.* import trading.events.{ AuthorEvent, ForecastEvent } import trading.forecasts.store.* import trading.lib.* -import trading.lib.Consumer.{ Msg, MsgId } +import trading.lib.Consumer.Msg -import cats.effect.kernel.{ MonadCancelThrow, Resource } +import cats.effect.kernel.MonadCancelThrow import cats.syntax.all.* -import fs2.Stream trait Engine[F[_]]: def run: Msg[ForecastCommand] => F[Unit] diff --git a/modules/forecasts/src/main/scala/trading/forecasts/Main.scala b/modules/forecasts/src/main/scala/trading/forecasts/Main.scala index 263219d2..1ff6e27b 100644 --- a/modules/forecasts/src/main/scala/trading/forecasts/Main.scala +++ b/modules/forecasts/src/main/scala/trading/forecasts/Main.scala @@ -6,10 +6,9 @@ import trading.core.http.Ember import trading.events.* import trading.forecasts.cdc.* import trading.forecasts.store.* -import trading.lib.{ *, given } +import trading.lib.* import cats.effect.* -import cats.effect.syntax.all.* import cats.syntax.all.* import dev.profunktor.pulsar.{ Producer as PulsarProducer, Pulsar, Subscription, Topic } import fs2.Stream diff --git a/modules/forecasts/src/main/scala/trading/forecasts/VotesHandler.scala b/modules/forecasts/src/main/scala/trading/forecasts/VotesHandler.scala index feb87152..125cb38a 100644 --- a/modules/forecasts/src/main/scala/trading/forecasts/VotesHandler.scala +++ b/modules/forecasts/src/main/scala/trading/forecasts/VotesHandler.scala @@ -1,7 +1,5 @@ package trading.forecasts -import scala.concurrent.duration.* - import trading.domain.* import trading.events.ForecastEvent import trading.forecasts.store.* diff --git a/modules/forecasts/src/main/scala/trading/forecasts/cdc/OutboxHandler.scala b/modules/forecasts/src/main/scala/trading/forecasts/cdc/OutboxHandler.scala index d41e384e..7953ca21 100644 --- a/modules/forecasts/src/main/scala/trading/forecasts/cdc/OutboxHandler.scala +++ b/modules/forecasts/src/main/scala/trading/forecasts/cdc/OutboxHandler.scala @@ -1,7 +1,5 @@ package trading.forecasts.cdc -import scala.concurrent.duration.* - import trading.domain.* import trading.events.* import trading.lib.* diff --git a/modules/forecasts/src/main/scala/trading/forecasts/store/AuthorStore.scala b/modules/forecasts/src/main/scala/trading/forecasts/store/AuthorStore.scala index 30870b00..ee639526 100644 --- a/modules/forecasts/src/main/scala/trading/forecasts/store/AuthorStore.scala +++ b/modules/forecasts/src/main/scala/trading/forecasts/store/AuthorStore.scala @@ -2,13 +2,11 @@ package trading.forecasts.store import trading.domain.* import trading.events.AuthorEvent -import trading.lib.* import cats.~> import cats.effect.kernel.{ MonadCancelThrow, Resource } import cats.syntax.all.* import doobie.{ ConnectionIO, Transactor } -import doobie.h2.* import doobie.implicits.* trait AuthorStore[F[_]]: diff --git a/modules/forecasts/src/main/scala/trading/forecasts/store/DB.scala b/modules/forecasts/src/main/scala/trading/forecasts/store/DB.scala index bf0868ed..1d588452 100644 --- a/modules/forecasts/src/main/scala/trading/forecasts/store/DB.scala +++ b/modules/forecasts/src/main/scala/trading/forecasts/store/DB.scala @@ -1,7 +1,6 @@ package trading.forecasts.store import cats.effect.kernel.{ Async, Resource } -import cats.syntax.all.* import doobie.ExecutionContexts import doobie.h2.H2Transactor import org.flywaydb.core.Flyway diff --git a/modules/forecasts/src/main/scala/trading/forecasts/store/DoobieTx.scala b/modules/forecasts/src/main/scala/trading/forecasts/store/DoobieTx.scala index 891e5047..a33bacfb 100644 --- a/modules/forecasts/src/main/scala/trading/forecasts/store/DoobieTx.scala +++ b/modules/forecasts/src/main/scala/trading/forecasts/store/DoobieTx.scala @@ -6,7 +6,6 @@ import cats.~> import cats.arrow.FunctionK import cats.effect.kernel.{ Async, Resource } import cats.effect.kernel.Resource.ExitCase.* -import cats.effect.syntax.all.* import cats.syntax.all.* import doobie.{ ConnectionIO, Transactor, WeakAsync } import doobie.free.connection.setAutoCommit diff --git a/modules/forecasts/src/main/scala/trading/forecasts/store/ForecastStore.scala b/modules/forecasts/src/main/scala/trading/forecasts/store/ForecastStore.scala index 535e5202..1ee45415 100644 --- a/modules/forecasts/src/main/scala/trading/forecasts/store/ForecastStore.scala +++ b/modules/forecasts/src/main/scala/trading/forecasts/store/ForecastStore.scala @@ -2,13 +2,11 @@ package trading.forecasts.store import trading.domain.* import trading.events.ForecastEvent -import trading.lib.* import cats.~> import cats.effect.kernel.{ MonadCancelThrow, Resource } import cats.syntax.all.* import doobie.{ ConnectionIO, Transactor } -import doobie.h2.* import doobie.implicits.* trait ForecastStore[F[_]]: diff --git a/modules/forecasts/src/test/scala/trading/forecasts/EngineSuite.scala b/modules/forecasts/src/test/scala/trading/forecasts/EngineSuite.scala index fa74b6e7..1d3104fb 100644 --- a/modules/forecasts/src/test/scala/trading/forecasts/EngineSuite.scala +++ b/modules/forecasts/src/test/scala/trading/forecasts/EngineSuite.scala @@ -5,16 +5,13 @@ import java.util.UUID import trading.IsUUID import trading.commands.ForecastCommand -import trading.domain.TradingStatus.* import trading.domain.* import trading.events.* import trading.forecasts.store.* import trading.lib.* import trading.lib.Consumer.{ Msg, MsgId } import trading.lib.Logger.NoOp.given -import trading.state.* -import cats.data.NonEmptyList import cats.effect.IO import cats.effect.kernel.{ Ref, Resource } import cats.syntax.all.* diff --git a/modules/forecasts/src/test/scala/trading/forecasts/VotesHandlerSuite.scala b/modules/forecasts/src/test/scala/trading/forecasts/VotesHandlerSuite.scala index 572cf05a..b2e88d94 100644 --- a/modules/forecasts/src/test/scala/trading/forecasts/VotesHandlerSuite.scala +++ b/modules/forecasts/src/test/scala/trading/forecasts/VotesHandlerSuite.scala @@ -3,7 +3,6 @@ package trading.forecasts import java.time.Instant import java.util.UUID -import trading.IsUUID import trading.domain.TradingStatus.* import trading.domain.* import trading.events.* @@ -11,12 +10,9 @@ import trading.forecasts.store.* import trading.lib.* import trading.lib.Consumer.{ Msg, MsgId } import trading.lib.Logger.NoOp.given -import trading.state.* -import cats.data.NonEmptyList import cats.effect.IO import cats.effect.kernel.{ Ref, Resource } -import cats.effect.syntax.all.* import cats.syntax.all.* import weaver.{ Expectations, SimpleIOSuite } import weaver.scalacheck.Checkers diff --git a/modules/lib/src/main/scala/trading/lib/Compaction.scala b/modules/lib/src/main/scala/trading/lib/Compaction.scala index caf041e1..1947bb63 100644 --- a/modules/lib/src/main/scala/trading/lib/Compaction.scala +++ b/modules/lib/src/main/scala/trading/lib/Compaction.scala @@ -5,7 +5,7 @@ import trading.domain.{ Alert, PriceUpdate } import trading.events.SwitchEvent import cats.syntax.all.* -import dev.profunktor.pulsar.{ MessageKey, ShardKey } +import dev.profunktor.pulsar.MessageKey /** * A compaction key corresponds to the (partitioning) `key` of a Pulsar `Message`, which is used for topic compaction diff --git a/modules/lib/src/main/scala/trading/lib/Consumer.scala b/modules/lib/src/main/scala/trading/lib/Consumer.scala index 0d966526..b35af9f0 100644 --- a/modules/lib/src/main/scala/trading/lib/Consumer.scala +++ b/modules/lib/src/main/scala/trading/lib/Consumer.scala @@ -9,13 +9,10 @@ import cats.effect.kernel.{ Async, Ref, Resource } import cats.effect.std.Queue import cats.syntax.all.* import dev.profunktor.pulsar.{ Consumer as PulsarConsumer, * } -import dev.profunktor.pulsar.transactions.Tx import fs2.Stream import fs2.kafka.{ CommittableOffset, CommittableOffsetBatch, ConsumerSettings, KafkaConsumer } import io.circe.{ Decoder, Encoder } import io.circe.parser.decode as jsonDecode -import org.apache.kafka.clients.consumer.OffsetAndMetadata -import org.apache.kafka.common.TopicPartition import org.apache.pulsar.client.api.{ DeadLetterPolicy, MessageId } trait Consumer[F[_], A] extends Acker[F, A]: diff --git a/modules/lib/src/main/scala/trading/lib/DistLock.scala b/modules/lib/src/main/scala/trading/lib/DistLock.scala index 6ce6baf4..7c728491 100644 --- a/modules/lib/src/main/scala/trading/lib/DistLock.scala +++ b/modules/lib/src/main/scala/trading/lib/DistLock.scala @@ -3,7 +3,6 @@ package trading.lib import scala.concurrent.duration.* import trading.domain.AppId -import trading.lib.Logger import cats.effect.kernel.{ Resource, Temporal } import cats.syntax.all.* diff --git a/modules/lib/src/main/scala/trading/lib/Producer.scala b/modules/lib/src/main/scala/trading/lib/Producer.scala index e6f747c4..229cb34f 100644 --- a/modules/lib/src/main/scala/trading/lib/Producer.scala +++ b/modules/lib/src/main/scala/trading/lib/Producer.scala @@ -2,11 +2,10 @@ package trading.lib import java.nio.charset.StandardCharsets.UTF_8 -import cats.Eq import cats.effect.kernel.{ Async, Ref, Resource } import cats.effect.std.Queue import cats.syntax.all.* -import cats.{ Applicative, Parallel, Show } +import cats.{ Applicative, Parallel } import dev.profunktor.pulsar.{ Producer as PulsarProducer, * } import fs2.kafka.{ KafkaProducer, ProducerSettings } import io.circe.Encoder @@ -44,7 +43,7 @@ object Producer: def test[F[_]: Applicative, A](ref: Ref[F, Option[A]]): Producer[F, A] = new Dummy[F, A]: override def send(a: A): F[Unit] = ref.set(Some(a)) - private def dummySeqIdMaker[F[_]: Applicative, A]: SeqIdMaker[F, A] = new: + def dummySeqIdMaker[F[_]: Applicative, A]: SeqIdMaker[F, A] = new: def make(lastSeqId: Long, currentMsg: A): F[Long] = Applicative[F].pure(0L) def pulsar[F[_]: Async: Logger: Parallel, A: Encoder]( diff --git a/modules/lib/src/main/scala/trading/lib/Txn.scala b/modules/lib/src/main/scala/trading/lib/Txn.scala index 915bd4dc..24bb699c 100644 --- a/modules/lib/src/main/scala/trading/lib/Txn.scala +++ b/modules/lib/src/main/scala/trading/lib/Txn.scala @@ -2,8 +2,6 @@ package trading.lib import scala.concurrent.duration.* -import trading.lib.Logger - import cats.effect.{ IO, Resource } import dev.profunktor.pulsar.Pulsar import dev.profunktor.pulsar.transactions.{ PulsarTx, Tx } diff --git a/modules/processor/src/main/scala/trading/processor/Engine.scala b/modules/processor/src/main/scala/trading/processor/Engine.scala index 9d8d9c9c..e02746c5 100644 --- a/modules/processor/src/main/scala/trading/processor/Engine.scala +++ b/modules/processor/src/main/scala/trading/processor/Engine.scala @@ -3,7 +3,6 @@ package trading.processor import trading.commands.* import trading.core.TradeEngine import trading.domain.{ EventId, Timestamp } -import trading.domain.TradingStatus.{ Off, On } import trading.events.* import trading.lib.* import trading.state.TradeState diff --git a/modules/processor/src/main/scala/trading/processor/Main.scala b/modules/processor/src/main/scala/trading/processor/Main.scala index 116b86c8..43bbb8bd 100644 --- a/modules/processor/src/main/scala/trading/processor/Main.scala +++ b/modules/processor/src/main/scala/trading/processor/Main.scala @@ -1,21 +1,16 @@ package trading.processor -import java.util.UUID - -import scala.concurrent.duration.* - import trading.commands.* import trading.core.AppTopic import trading.core.http.Ember import trading.domain.AppId import trading.events.* -import trading.lib.{ *, given } +import trading.lib.* import trading.state.TradeState import cats.effect.* import cats.syntax.all.* import dev.profunktor.pulsar.{ Config as _, Consumer as PulsarConsumer, Producer as PulsarProducer, * } -import dev.profunktor.pulsar.transactions.PulsarTx import fs2.Stream object Main extends IOApp.Simple: diff --git a/modules/processor/src/test/scala/trading/processor/EngineSuite.scala b/modules/processor/src/test/scala/trading/processor/EngineSuite.scala index 69094a55..69c24e46 100644 --- a/modules/processor/src/test/scala/trading/processor/EngineSuite.scala +++ b/modules/processor/src/test/scala/trading/processor/EngineSuite.scala @@ -13,7 +13,7 @@ import trading.lib.Logger.NoOp.given import trading.state.* import cats.data.NonEmptyList -import cats.effect.{ IO, Ref, Resource } +import cats.effect.{ IO, Ref } import cats.syntax.all.* import weaver.SimpleIOSuite import weaver.scalacheck.Checkers diff --git a/modules/snapshots/src/main/scala/trading/snapshots/Main.scala b/modules/snapshots/src/main/scala/trading/snapshots/Main.scala index 7c070e54..30b1d929 100644 --- a/modules/snapshots/src/main/scala/trading/snapshots/Main.scala +++ b/modules/snapshots/src/main/scala/trading/snapshots/Main.scala @@ -4,7 +4,7 @@ import scala.concurrent.duration.* import trading.core.http.Ember import trading.core.snapshots.{ SnapshotReader, SnapshotWriter } -import trading.core.{ AppTopic, TradeEngine } +import trading.core.AppTopic import trading.domain.AppId import trading.events.{ SwitchEvent, TradeEvent } import trading.lib.{ *, given } diff --git a/modules/snapshots/src/test/scala/trading/snapshots/EngineSuite.scala b/modules/snapshots/src/test/scala/trading/snapshots/EngineSuite.scala index 3e67f013..70cee1e9 100644 --- a/modules/snapshots/src/test/scala/trading/snapshots/EngineSuite.scala +++ b/modules/snapshots/src/test/scala/trading/snapshots/EngineSuite.scala @@ -1,8 +1,5 @@ package trading.snapshots -import java.util.UUID - -import trading.commands.* import trading.core.snapshots.SnapshotWriter import trading.domain.* import trading.domain.generators.* @@ -16,7 +13,6 @@ import cats.data.NonEmptyList import cats.effect.IO import cats.effect.kernel.Ref import cats.syntax.all.* -import fs2.Stream import org.scalacheck.Gen import weaver.{ Expectations, SimpleIOSuite } import weaver.scalacheck.Checkers diff --git a/modules/tracing/src/main/scala/trading/trace/Config.scala b/modules/tracing/src/main/scala/trading/trace/Config.scala index 91744514..d9375939 100644 --- a/modules/tracing/src/main/scala/trading/trace/Config.scala +++ b/modules/tracing/src/main/scala/trading/trace/Config.scala @@ -1,7 +1,5 @@ package trading.trace -import scala.concurrent.duration.* - import trading.domain.{ *, given } import trading.Newtype diff --git a/modules/tracing/src/main/scala/trading/trace/Main.scala b/modules/tracing/src/main/scala/trading/trace/Main.scala index 1bba8b97..292f3477 100644 --- a/modules/tracing/src/main/scala/trading/trace/Main.scala +++ b/modules/tracing/src/main/scala/trading/trace/Main.scala @@ -5,10 +5,9 @@ import scala.concurrent.duration.* import trading.commands.* import trading.core.AppTopic import trading.core.http.Ember -import trading.core.snapshots.SnapshotReader import trading.domain.Alert import trading.events.* -import trading.lib.{ *, given } +import trading.lib.* import trading.trace.fsm.* import trading.trace.tracer.* diff --git a/modules/tracing/src/main/scala/trading/trace/fsm/forecasting.scala b/modules/tracing/src/main/scala/trading/trace/fsm/forecasting.scala index 91d7efb6..762bff1d 100644 --- a/modules/tracing/src/main/scala/trading/trace/fsm/forecasting.scala +++ b/modules/tracing/src/main/scala/trading/trace/fsm/forecasting.scala @@ -1,17 +1,12 @@ package trading.trace package fsm -import java.time.Instant - -import scala.concurrent.duration.* - import trading.commands.* import trading.domain.* import trading.events.* -import trading.lib.{ FSM, Logger, Time } -import trading.trace.tracer.ForecastingTracer +import trading.lib.{ FSM, Logger } -import cats.{ Applicative, Monad } +import cats.Applicative import cats.syntax.all.* type ForecastState = (List[AuthorEvent], List[ForecastEvent], List[ForecastCommand]) diff --git a/modules/tracing/src/main/scala/trading/trace/fsm/trading.scala b/modules/tracing/src/main/scala/trading/trace/fsm/trading.scala index 937c5669..634b1693 100644 --- a/modules/tracing/src/main/scala/trading/trace/fsm/trading.scala +++ b/modules/tracing/src/main/scala/trading/trace/fsm/trading.scala @@ -9,11 +9,9 @@ import trading.commands.* import trading.domain.* import trading.events.* import trading.lib.{ FSM, Logger, Time } -import trading.trace.tracer.TradingTracer -import cats.{ Applicative, Monad } +import cats.Monad import cats.syntax.all.* -import natchez.Kernel type MatchingIds = Map[CorrelationId, (Timestamp, Option[CmdKernel], Option[EvtKernel])] type Tick = Unit diff --git a/modules/tracing/src/test/scala/trading/trace/fsm/TradingFSMSuite.scala b/modules/tracing/src/test/scala/trading/trace/fsm/TradingFSMSuite.scala index 9ae693b8..5fcbd37d 100644 --- a/modules/tracing/src/test/scala/trading/trace/fsm/TradingFSMSuite.scala +++ b/modules/tracing/src/test/scala/trading/trace/fsm/TradingFSMSuite.scala @@ -166,7 +166,7 @@ object TradingFSMSuite extends SimpleIOSuite with Checkers: alt <- tradeAlertGen yield (cid, cmd, evt, alt) - forall(gen) { (cid, cmd, evt, alt) => + forall(gen) { (_, cmd, evt, _) => for cmds <- IO.ref(Map.empty[CorrelationId, TradeCommand]) evts <- IO.ref(Map.empty[CorrelationId, TradeEvent]) diff --git a/modules/ws-client/src/main/scala/trading/client/Subscriptions.scala b/modules/ws-client/src/main/scala/trading/client/Subscriptions.scala index 33c9c8b3..4bf71fe0 100644 --- a/modules/ws-client/src/main/scala/trading/client/Subscriptions.scala +++ b/modules/ws-client/src/main/scala/trading/client/Subscriptions.scala @@ -2,10 +2,8 @@ package trading.client import trading.ws.WsOut -import cats.effect.IO import io.circe.parser.decode as jsonDecode -import tyrian.Sub import tyrian.websocket.WebSocketEvent as WSEvent object Subs: diff --git a/modules/ws-client/src/main/scala/trading/client/Update.scala b/modules/ws-client/src/main/scala/trading/client/Update.scala index f34f0d92..db2d0126 100644 --- a/modules/ws-client/src/main/scala/trading/client/Update.scala +++ b/modules/ws-client/src/main/scala/trading/client/Update.scala @@ -7,7 +7,6 @@ import trading.ws.{ WsIn, WsOut } import cats.effect.IO import cats.syntax.all.* -import org.scalajs.dom import tyrian.* import tyrian.cmds.Dom diff --git a/modules/ws-server/src/main/scala/trading/ws/WsConnections.scala b/modules/ws-server/src/main/scala/trading/ws/WsConnections.scala index 5afdf5c4..6a451536 100644 --- a/modules/ws-server/src/main/scala/trading/ws/WsConnections.scala +++ b/modules/ws-server/src/main/scala/trading/ws/WsConnections.scala @@ -2,7 +2,6 @@ package trading.ws import trading.domain.SocketId -import cats.Functor import cats.effect.kernel.Concurrent import cats.syntax.functor.* import fs2.Stream diff --git a/modules/ws-server/src/main/scala/trading/ws/WsRoutes.scala b/modules/ws-server/src/main/scala/trading/ws/WsRoutes.scala index 19095219..86fd0f10 100644 --- a/modules/ws-server/src/main/scala/trading/ws/WsRoutes.scala +++ b/modules/ws-server/src/main/scala/trading/ws/WsRoutes.scala @@ -1,6 +1,6 @@ package trading.ws -import trading.domain.{ Alert, SocketId } +import trading.domain.SocketId import trading.lib.{ GenUUID, Logger } import cats.Monad diff --git a/modules/ws-server/src/test/scala/trading/ws/HandlerSuite.scala b/modules/ws-server/src/test/scala/trading/ws/HandlerSuite.scala index 2083c9ba..e34bb5cc 100644 --- a/modules/ws-server/src/test/scala/trading/ws/HandlerSuite.scala +++ b/modules/ws-server/src/test/scala/trading/ws/HandlerSuite.scala @@ -11,10 +11,9 @@ import cats.data.NonEmptyList import cats.effect.IO import cats.syntax.all.* import fs2.Stream -import fs2.concurrent.Topic import io.circe.syntax.* import org.http4s.websocket.WebSocketFrame -import org.http4s.websocket.WebSocketFrame.{ Close, Text } +import org.http4s.websocket.WebSocketFrame.Text import weaver.SimpleIOSuite import weaver.scalacheck.Checkers @@ -57,7 +56,7 @@ object HandlerSuite extends SimpleIOSuite with Checkers: IO.deferred[Unit], // switch to sync the sending of the WsIn.Close message IO.deferred[Either[Throwable, Unit]] // to know when there is an active subscription ).tupled - .flatMap { (sid, out, switch, connected) => + .flatMap { (sid, out, switch, _) => Handler.make(sid, conns, Stream.emits(alerts)).flatMap { h => val recv = Stream diff --git a/modules/x-demo/src/main/scala/demo/DoobieTxDemo.scala b/modules/x-demo/src/main/scala/demo/DoobieTxDemo.scala index d925c0b7..314b84a5 100644 --- a/modules/x-demo/src/main/scala/demo/DoobieTxDemo.scala +++ b/modules/x-demo/src/main/scala/demo/DoobieTxDemo.scala @@ -6,16 +6,10 @@ import trading.lib.Logger import trading.forecasts.store.* import trading.forecasts.store.{ DB, DoobieTx } -import cats.~> import cats.effect.* import cats.effect.kernel.Resource.ExitCase -import cats.effect.syntax.all.* import cats.syntax.all.* import doobie.* -import doobie.ExecutionContexts -import doobie.h2.* -import doobie.hi.connection.{ commit, rollback } -import doobie.free.connection.setAutoCommit import doobie.implicits.* object DoobieTxDemo extends IOApp.Simple: diff --git a/modules/x-demo/src/main/scala/demo/EffectfulContext.scala b/modules/x-demo/src/main/scala/demo/EffectfulContext.scala index 9d54aa79..8d569454 100644 --- a/modules/x-demo/src/main/scala/demo/EffectfulContext.scala +++ b/modules/x-demo/src/main/scala/demo/EffectfulContext.scala @@ -5,7 +5,7 @@ import java.util.UUID import scala.concurrent.duration.* import cats.effect.* -import cats.effect.std.{ Console, Supervisor } +import cats.effect.std.Supervisor import cats.syntax.all.* // https://docs.scala-lang.org/scala3/reference/contextual/context-functions.html @@ -34,7 +34,6 @@ object EffectfulContext extends IOApp.Simple: } val p1: Ctx ?=> IO[Unit] = - val ctx = summon[Ctx] IO.println("Running program #1") *> p2 def p2(using ctx: Ctx): IO[Unit] = diff --git a/modules/x-demo/src/main/scala/demo/ErrorLifting.scala b/modules/x-demo/src/main/scala/demo/ErrorLifting.scala index 830f17f4..87d079ae 100644 --- a/modules/x-demo/src/main/scala/demo/ErrorLifting.scala +++ b/modules/x-demo/src/main/scala/demo/ErrorLifting.scala @@ -2,12 +2,14 @@ package demo import scala.util.control.NoStackTrace import scala.util.Random +import scala.annotation.nowarn import trading.lib.* import cats.effect.* import cats.syntax.all.* +@nowarn object ErrorLifting extends IOApp.Simple: case class Err1() extends NoStackTrace diff --git a/modules/x-demo/src/main/scala/demo/PulsarCDC.scala b/modules/x-demo/src/main/scala/demo/PulsarCDC.scala index 0e040dc8..cbe327b2 100644 --- a/modules/x-demo/src/main/scala/demo/PulsarCDC.scala +++ b/modules/x-demo/src/main/scala/demo/PulsarCDC.scala @@ -1,6 +1,5 @@ package demo -import java.nio.charset.StandardCharsets.UTF_8 import java.util.UUID import scala.concurrent.duration.* @@ -10,9 +9,7 @@ import trading.lib.{ Consumer, Logger } import trading.lib.Logger.NoOp.given import cats.effect.* -import cats.effect.syntax.all.* -import cats.syntax.all.* -import dev.profunktor.pulsar.{ Config as PulsarConfig, Producer as PulsarProducer, Pulsar, Subscription, Topic } +import dev.profunktor.pulsar.{ Config as PulsarConfig, Pulsar, Subscription, Topic } import doobie.Transactor import doobie.* import doobie.implicits.* diff --git a/modules/x-demo/src/main/scala/demo/RefinedDemo.scala b/modules/x-demo/src/main/scala/demo/RefinedDemo.scala index 538341af..b87d9693 100644 --- a/modules/x-demo/src/main/scala/demo/RefinedDemo.scala +++ b/modules/x-demo/src/main/scala/demo/RefinedDemo.scala @@ -1,9 +1,6 @@ package demo import eu.timepit.refined.* -import eu.timepit.refined.api.Refined -import eu.timepit.refined.auto.* -import eu.timepit.refined.numeric.* import eu.timepit.refined.types.numeric.PosInt @main def refinedDemo = diff --git a/modules/x-demo/src/main/scala/demo/tracer/TraceApp.scala b/modules/x-demo/src/main/scala/demo/tracer/TraceApp.scala index 84dc8863..be4efef9 100644 --- a/modules/x-demo/src/main/scala/demo/tracer/TraceApp.scala +++ b/modules/x-demo/src/main/scala/demo/tracer/TraceApp.scala @@ -9,23 +9,20 @@ import demo.tracer.http.* export demo.tracer.NT.syntax.* import trading.core.http.Ember -import trading.lib.{ *, given } +import trading.lib.* import trading.lib.Consumer.Msg import trading.trace.tracer.Honeycomb -import cats.~> import cats.data.Kleisli import cats.effect.* import cats.syntax.all.* import com.comcast.ip4s.* -import dev.profunktor.pulsar.{ Config as PulsarConfig, Pulsar } +import dev.profunktor.pulsar.Pulsar import fs2.Stream import io.circe.Codec -import org.http4s.HttpRoutes import org.http4s.server.Server import natchez.{ EntryPoint, Span, Trace } import natchez.http4s.syntax.entrypoint.* -import natchez.Kernel case class User(id: UUID, name: String) derives Codec.AsObject diff --git a/modules/x-demo/src/main/scala/demo/tracer/db/UsersDB.scala b/modules/x-demo/src/main/scala/demo/tracer/db/UsersDB.scala index 769e148b..64475065 100644 --- a/modules/x-demo/src/main/scala/demo/tracer/db/UsersDB.scala +++ b/modules/x-demo/src/main/scala/demo/tracer/db/UsersDB.scala @@ -5,7 +5,7 @@ import java.util.UUID import scala.util.control.NoStackTrace -import cats.{ Monad, MonadThrow } +import cats.MonadThrow import cats.effect.kernel.Ref import cats.syntax.all.* import natchez.Trace diff --git a/modules/x-demo/src/main/scala/demo/tracer/syntax.scala b/modules/x-demo/src/main/scala/demo/tracer/syntax.scala index 215f6df0..581a76ca 100644 --- a/modules/x-demo/src/main/scala/demo/tracer/syntax.scala +++ b/modules/x-demo/src/main/scala/demo/tracer/syntax.scala @@ -1,12 +1,11 @@ package demo.tracer -import cats.~> import cats.data.{ Kleisli, OptionT } -import cats.effect.{ IO, Resource } +import cats.effect.IO import cats.syntax.all.* -import natchez.{ EntryPoint, Kernel, Span, Trace } +import natchez.{ EntryPoint, Kernel, Trace } import natchez.http4s.syntax.EntryPointOps.ExcludedHeaders -import org.http4s.{ HttpRoutes, Request, Response } +import org.http4s.HttpRoutes import org.typelevel.ci.* extension (kv: Map[String, String]) diff --git a/modules/x-demo/src/test/scala/demo/dedup/ConflictSuite.scala b/modules/x-demo/src/test/scala/demo/dedup/ConflictSuite.scala index 1af59044..4cbf7623 100644 --- a/modules/x-demo/src/test/scala/demo/dedup/ConflictSuite.scala +++ b/modules/x-demo/src/test/scala/demo/dedup/ConflictSuite.scala @@ -9,7 +9,6 @@ import trading.commands.TradeCommand import trading.domain.* import trading.state.* -import cats.data.NonEmptyList import cats.syntax.all.* import weaver.FunSuite import weaver.scalacheck.Checkers diff --git a/project/plugins.sbt b/project/plugins.sbt index 817600ce..606c0dc4 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.2") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.4") addSbtPlugin("io.spray" % "sbt-revolver" % "0.10.0") addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.16") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")