Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chores: various update inc scala 3.5.2 #389

Merged
merged 4 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
extraSbtFiles: 'tmp/remote-cache/**'

- name: "Starting up Redis 🐳"
run: docker-compose up -d redis
run: docker compose up -d redis

- name: "Install Nix ❄️"
uses: cachix/install-nix-action@v22
Expand All @@ -47,4 +47,4 @@ jobs:
run: nix develop -c sbt 'pullRemoteCache;test;it/test;webapp/fastLinkJS;pushRemoteCache'

- name: "Shutting down Redis 🐳"
run: docker-compose down
run: docker compose down
6 changes: 3 additions & 3 deletions .github/workflows/ci-smokey.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ jobs:
docker tag ghcr.io/gvolpe/trading-ws trading-ws:latest

- name: "Starting up Pulsar & Redis 🐳"
run: docker-compose up -d pulsar redis
run: docker compose up -d pulsar redis

- name: "Starting up trading core services 🐳"
run: docker-compose up -d processor alerts ws-server
run: docker compose up -d processor alerts ws-server

- name: "Run smokey tests 🚀"
run: nix develop -c sbt 'smokey/test'

- name: "Shutting down containers 🐳"
run: docker-compose down
run: docker compose down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Dependencies._
import sbtwelcome._

ThisBuild / scalaVersion := "3.4.1"
ThisBuild / scalaVersion := "3.5.2"
ThisBuild / version := "0.1.0"
ThisBuild / organization := "dev.profunktor"
ThisBuild / organizationName := "ProfunKtor"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ object generators:
val symbolGen: Gen[Symbol] =
Gen
.oneOf("EURPLN", "GBPUSD", "CADUSD", "EURUSD", "CHFUSD", "CHFEUR")
.map(s => Symbol(s.refine))
.map(s => Symbol(s.refineUnsafe))

val symbolWithEmptyGen: Gen[Symbol] =
Gen.frequency(
Expand Down
2 changes: 1 addition & 1 deletion modules/domain/shared/src/main/scala/trading/domain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import scala.concurrent.duration.FiniteDuration

import trading.*

import cats.{ Eq, Monoid, Order, Show }
import cats.{ Monoid, Show }
import io.circe.*

export Extensions.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import trading.domain.*
import trading.events.*

import io.circe.Codec
import io.circe.Decoder

// Upgrading from circe 0.14.6 to 0.14.7 requires this instance ¯\_(ツ)_/¯
given Codec[Either[AuthorEvent, ForecastEvent]] = Codec.AsObject.derived

final case class OutboxEvent(
event_id: EventId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ object SQL:
}

given Read[Forecast] = Read[(UUID, String, String, String, Int)].map { (id, sl, tag, desc, sc) =>
Forecast(ForecastId(id), Symbol(sl.refine), ForecastTag.from(tag), ForecastDescription(desc), ForecastScore(sc))
Forecast(
ForecastId(id),
Symbol(sl.refineUnsafe),
ForecastTag.from(tag),
ForecastDescription(desc),
ForecastScore(sc)
)
}

extension (res: VoteResult)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import trading.domain.*
import trading.events.*
import trading.forecasts.store.*
import trading.lib.*
import trading.lib.Consumer.{ Msg, MsgId }
import trading.lib.Consumer.MsgId
import trading.lib.Logger.NoOp.given

import cats.effect.IO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import trading.domain.*
import trading.events.*
import trading.forecasts.store.*
import trading.lib.*
import trading.lib.Consumer.{ Msg, MsgId }
import trading.lib.Consumer.MsgId
import trading.lib.Logger.NoOp.given

import cats.effect.IO
Expand Down
2 changes: 1 addition & 1 deletion modules/lib/src/main/scala/trading/lib/ext.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package trading.lib

import scala.reflect.ClassTag

import trading.lib.Consumer.{ Msg, MsgId }
import trading.lib.Consumer.Msg

import cats.{ Monad, MonadThrow }
import cats.effect.kernel.Deferred
Expand Down
1 change: 0 additions & 1 deletion modules/x-demo/src/main/scala/demo/PulsarCDC.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import trading.lib.Logger.NoOp.given

import cats.effect.*
import dev.profunktor.pulsar.{ Config as PulsarConfig, Pulsar, Subscription, Topic }
import doobie.Transactor
import doobie.*
import doobie.implicits.*
import doobie.postgres.*
Expand Down
40 changes: 21 additions & 19 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,38 @@ import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._
object Dependencies {

object V {
val cats = "2.10.0"
val catsEffect = "3.5.4"
val circe = "0.14.6"
val ciris = "3.2.0"
val doobie = "1.0.0-RC4"
val cats = "2.12.0"
val catsEffect = "3.5.7"
val circe = "0.14.10"
val circeRefined = "0.15.1"
val ciris = "3.6.0"
val doobie = "1.0.0-RC6"
val flyway = "8.5.13"
val fs2Core = "3.9.4"
val fs2Kafka = "3.4.0"
val http4s = "1.0.0-M41"
val fs2Core = "3.11.0"
val fs2Kafka = "3.6.0"
val http4s = "1.0.0-M43"
val http4sMetrics = "1.0.0-M38"
val http4sWs = "1.0.0-M9"
val ip4s = "3.4.0"
val ip4s = "3.6.0"
val iron = "2.6.0"
val kittens = "3.3.0"
val kittens = "3.4.0"
val log4cats = "2.7.0"
val monocle = "3.2.0"
val natchez = "0.3.5"
val natchezHttp4s = "0.5.0"
val monocle = "3.3.0"
val natchez = "0.3.7"
val natchezHttp4s = "0.6.0"
val neutron = "0.8.0"
val odin = "0.13.0"
val odin = "0.15.0"
val redis4cats = "1.7.1"
val refined = "0.11.1"
val refined = "0.11.2"

val scalajsTime = "2.4.0"
val tyrian = "0.6.1"

val scalacheck = "1.18.0"
val scalacheck = "1.18.1"
val weaver = "0.8.4"

val organizeImports = "0.6.0"
val zerowaste = "0.2.21"
val zerowaste = "0.2.27"
}

object Libraries {
Expand All @@ -52,7 +53,8 @@ object Dependencies {

val circeCore = circe("core")
val circeParser = circe("parser")
val circeRefined = circe("refined")

val circeRefined = Def.setting("io.circe" %%% "circe-refined" % V.circeRefined)

val doobieH2 = "org.tpolecat" %% "doobie-h2" % V.doobie
val doobiePg = "org.tpolecat" %% "doobie-postgres" % V.doobie
Expand Down Expand Up @@ -81,7 +83,7 @@ object Dependencies {

val monocleCore = Def.setting("dev.optics" %%% "monocle-core" % V.monocle)

val odin = "com.github.valskalla" %% "odin-core" % V.odin
val odin = "dev.scalafreaks" %% "odin-core" % V.odin

// only for ember
val log4catsNoop = "org.typelevel" %% "log4cats-noop" % V.log4cats
Expand Down
8 changes: 4 additions & 4 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.0")
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.10.0")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.16")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.10.4")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.14.0")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.17.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
addSbtPlugin("com.github.reibitto" % "sbt-welcome" % "0.4.0")
Loading