Skip to content

Commit

Permalink
chore: upgrade dependencies (#183)
Browse files Browse the repository at this point in the history
* chore: Update sbt-dynver from 5.0.1 to 5.1.0

* chore: Update scribe from 3.15.0 to 3.15.2

* chore: Update scribe-cats from 3.15.0 to 3.15.2

* chore: Update scribe-file from 3.15.0 to 3.15.2

* chore: Update scribe-json-circe from 3.15.0 to 3.15.2

* chore: Update scribe-slf4j from 3.15.0 to 3.15.2

* chore: Update client3:core from 3.9.8 to 3.10.1

* chore: Update tapir-http4s-client from 1.11.4 to 1.11.7

* chore: Update tapir-http4s-server from 1.11.4 to 1.11.7

* chore: Update tapir-iron from 1.11.4 to 1.11.7

* chore: Update tapir-json-circe from 1.11.4 to 1.11.7

* chore: Update tapir-openapi-docs from 1.11.4 to 1.11.7

* chore: Update tapir-opentelemetry-metrics from 1.11.4 to 1.11.7

* chore: Update tapir-sttp-stub-server from 1.11.4 to 1.11.7

* chore: Update tapir-swagger-ui-bundle from 1.11.4 to 1.11.7

* chore: Update fs2-rabbit from 5.2.0 to 5.3.0

* chore: Update flyway-core from 10.18.0 to 10.18.2

* chore: Update flyway-database-postgresql from 10.18.0 to 10.18.2

* chore: Update http4s-circe from 0.23.28 to 0.23.29

* chore: Update http4s-core from 0.23.28 to 0.23.29

* chore: Update http4s-dsl from 0.23.28 to 0.23.29

* chore: Update http4s-netty-client from 0.5.19 to 0.5.20

* chore: Update http4s-netty-server from 0.5.19 to 0.5.20

* chore: Update scala3-library from 3.3.3 to 3.3.4

* chore: Update sbt from 1.10.2 to 1.10.4

* chore: Update cats-collections-core from 0.9.8 to 0.9.9

* chore: Update cats-effect from 3.5.4 to 3.5.5

* chore: Upgrade dependencies

---------

Co-authored-by: Scala Steward <[email protected]>
  • Loading branch information
rlemaitre and scala-steward authored Nov 25, 2024
1 parent 94b2b6b commit 02c8132
Show file tree
Hide file tree
Showing 15 changed files with 85 additions and 68 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ body:
description: |
examples:
- **JVM**: Oracle GraalVM 21.0.2
- **Scala**: 3.3.3
- **Scala**: 3.3.4
- **Pillars**: 0.2.22
value: |
- **JVM**:
Expand Down
4 changes: 3 additions & 1 deletion .scala-steward.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ reviewers = [ "rlemaitre" ]

updates.ignore = [
{ groupId = "io.circe", artifactId = "circe-yaml-v12", version = "1.15.0" },
{ groupId = "io.circe", artifactId = "circe-yaml", version = "1.15.0" }
{ groupId = "io.circe", artifactId = "circe-yaml", version = "1.15.0" },
{ groupId = "org.tpolecat", artifactId = "skunk-core", version = "1.1.0-M3" },
{ groupId = "org.tpolecat", artifactId = "skunk-circe", version = "1.1.0-M3" }
]

1 change: 1 addition & 0 deletions .scalafix.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ rules = [
]

OrganizeImports.removeUnused = true
OrganizeImports.targetDialect = Scala3
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
java oracle-graalvm-21.0.2
sbt 1.10.1
doctoolchain 3.2.0
scala 3.5.2
58 changes: 35 additions & 23 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.typelevel.scalacoptions.ScalacOptions
import org.typelevel.scalacoptions.ScalaVersion

ThisBuild / versionScheme := Some("semver-spec")
ThisBuild / scalaVersion := "3.3.3"
ThisBuild / scalaVersion := "3.5.2"
ThisBuild / organization := "com.rlemaitre"
ThisBuild / homepage := Some(url("https://pillars.dev/"))
ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org"
Expand Down Expand Up @@ -30,7 +30,7 @@ ThisBuild / licenses += (
)
)
ThisBuild / scalacOptions ++= ScalacOptions.tokensForVersion(
ScalaVersion.V3_3_0,
ScalaVersion.V3_5_0,
Set(
ScalacOptions.deprecation,
ScalacOptions.feature,
Expand All @@ -41,7 +41,7 @@ ThisBuild / scalacOptions ++= ScalacOptions.tokensForVersion(
//javaOptions += "-Dotel.java.global-autoconfigure.enabled=true"

Compile / scalacOptions ++= ScalacOptions.tokensForVersion(
ScalaVersion.V3_3_0,
ScalaVersion.V3_5_0,
Set(
ScalacOptions.sourceFuture,
ScalacOptions.deprecation,
Expand All @@ -59,6 +59,10 @@ outputStrategy := Some(StdoutOutput)
//libraryDependencySchemes ++= Seq(
// "org.typelevel" %% "otel4s-core-trace" % VersionScheme.Always
//)
val libDependencySchemes = Seq(
"io.circe" %% "circe-yaml" % VersionScheme.Always,
"org.typelevel" %% "otel4s-core-trace" % VersionScheme.Always
)

lazy val core = Project("pillars-core", file("modules/core"))
.enablePlugins(BuildInfoPlugin)
Expand All @@ -67,18 +71,19 @@ lazy val core = Project("pillars-core", file("modules/core"))
description := "pillars-core is a scala 3 library providing base services for writing backend applications",
libraryDependencies ++= Dependencies.core,
buildInfoKeys := Seq[BuildInfoKey](name, version, description),
buildInfoPackage := "pillars.build"
buildInfoPackage := "pillars.build",
libraryDependencySchemes ++= libDependencySchemes
)

lazy val dbSkunk = Project("pillars-db-skunk", file("modules/db-skunk"))
.enablePlugins(BuildInfoPlugin)
.settings(
name := "pillars-db-skunk",
description := "pillars-db-skunk is a scala 3 library providing database services for writing backend applications using skunk",
name := "pillars-db-skunk",
description := "pillars-db-skunk is a scala 3 library providing database services for writing backend applications using skunk",
libraryDependencies ++= Dependencies.skunk,
buildInfoKeys := Seq[BuildInfoKey](name, version, description),
buildInfoPackage := "pillars.db.build",
libraryDependencySchemes += "org.typelevel" %% "otel4s-core-trace" % VersionScheme.Always
buildInfoKeys := Seq[BuildInfoKey](name, version, description),
buildInfoPackage := "pillars.db.build",
libraryDependencySchemes ++= libDependencySchemes
)
.dependsOn(core)

Expand All @@ -89,7 +94,8 @@ lazy val dbDoobie = Project("pillars-db-doobie", file("modules/db-doobie"))
description := "pillars-db-doobie is a scala 3 library providing database services for writing backend applications using doobie",
libraryDependencies ++= Dependencies.doobie,
buildInfoKeys := Seq[BuildInfoKey](name, version, description),
buildInfoPackage := "pillars.doobie.build"
buildInfoPackage := "pillars.doobie.build",
libraryDependencySchemes ++= libDependencySchemes
)
.dependsOn(core)

Expand All @@ -100,7 +106,8 @@ lazy val redisRediculous = Project("pillars-redis-rediculous", file("modules/red
description := "pillars-redis-rediculous is a scala 3 library providing redis services for writing backend applications using rediculous",
libraryDependencies ++= Dependencies.rediculous,
buildInfoKeys := Seq[BuildInfoKey](name, version, description),
buildInfoPackage := "pillars.doobie.build"
buildInfoPackage := "pillars.doobie.build",
libraryDependencySchemes ++= libDependencySchemes
)
.dependsOn(core)

Expand All @@ -112,7 +119,8 @@ lazy val dbMigrations = Project("pillars-db-migration", file("modules/db-migrati
libraryDependencySchemes += "org.typelevel" %% "otel4s-core-trace" % VersionScheme.Always,
libraryDependencies ++= Dependencies.migrations,
buildInfoKeys := Seq[BuildInfoKey](name, version, description),
buildInfoPackage := "pillars.db.migrations.build"
buildInfoPackage := "pillars.db.migrations.build",
libraryDependencySchemes ++= libDependencySchemes
)
.dependsOn(core, dbSkunk)

Expand All @@ -123,7 +131,8 @@ lazy val rabbitmqFs2 = Project("pillars-rabbitmq-fs2", file("modules/rabbitmq-fs
description := "pillars-rabbitmq-fs2 is a scala 3 library providing RabbitMQ services for writing backend applications using fs2-rabbit",
libraryDependencies ++= Dependencies.fs2Rabbit,
buildInfoKeys := Seq[BuildInfoKey](name, version, description),
buildInfoPackage := "pillars.rabbitmq.fs2.build"
buildInfoPackage := "pillars.rabbitmq.fs2.build",
libraryDependencySchemes ++= libDependencySchemes
)
.dependsOn(core)

Expand All @@ -134,7 +143,8 @@ lazy val flags = Project("pillars-flags", file("modules/flags"))
description := "pillars-flag is a scala 3 library providing feature flag services for writing backend applications",
libraryDependencies ++= Dependencies.flags,
buildInfoKeys := Seq[BuildInfoKey](name, version, description),
buildInfoPackage := "pillars.flags.build"
buildInfoPackage := "pillars.flags.build",
libraryDependencySchemes ++= libDependencySchemes
)
.dependsOn(core)

Expand All @@ -145,29 +155,31 @@ lazy val httpClient = Project("pillars-http-client", file("modules/http-client")
description := "pillars-http-client is a scala 3 library providing http client services for writing backend applications",
libraryDependencies ++= Dependencies.httpClient,
buildInfoKeys := Seq[BuildInfoKey](name, version, description),
buildInfoPackage := "pillars.httpclient.build"
buildInfoPackage := "pillars.httpclient.build",
libraryDependencySchemes ++= libDependencySchemes
)
.dependsOn(core)

// tag::example[]
lazy val example = Project("pillars-example", file("modules/example"))
.enablePlugins(BuildInfoPlugin) // //<1>
.settings(
name := "pillars-example", // //<2>
description := "pillars-example is an example of application using pillars", // //<3>
name := "pillars-example", // //<2>
description := "pillars-example is an example of application using pillars", // //<3>
libraryDependencies ++= Dependencies.tests ++ Dependencies.migrationsRuntime,
buildInfoKeys := Seq[BuildInfoKey](name, version, description), // //<4>
buildInfoOptions := Seq(BuildInfoOption.Traits("pillars.BuildInfo")), // //<5>
buildInfoPackage := "example.build", // //<6>
publish / skip := true,
libraryDependencySchemes += "org.typelevel" %% "otel4s-core-trace" % VersionScheme.Always
buildInfoKeys := Seq[BuildInfoKey](name, version, description), // //<4>
buildInfoOptions := Seq(BuildInfoOption.Traits("pillars.BuildInfo")), // //<5>
buildInfoPackage := "example.build", // //<6>
publish / skip := true,
libraryDependencySchemes ++= libDependencySchemes
)
.dependsOn(core, dbSkunk, flags, httpClient, dbMigrations)
// end::example[]
lazy val docs = Project("pillars-docs", file("modules/docs"))
.settings(
name := "pillars-docs",
publish / skip := true
publish / skip := true,
libraryDependencySchemes ++= libDependencySchemes
)
.dependsOn(core)

Expand Down
1 change: 0 additions & 1 deletion modules/core/src/main/scala/pillars/AdminServer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import com.comcast.ip4s.*
import io.circe.Codec
import io.circe.derivation.Configuration
import pillars.AdminServer.Config
import pillars.PillarsError.View
import sttp.tapir.*

final case class AdminServer[F[_]: Async](
Expand Down
2 changes: 1 addition & 1 deletion modules/core/src/main/scala/pillars/HttpServer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ object HttpServer:
new ExceptionHandler[F]:
override def apply(ctx: ExceptionContext)(implicit
monad: MonadError[F]
): F[Option[ValuedEndpointOutput[_]]] =
): F[Option[ValuedEndpointOutput[?]]] =
def handlePillarsError(e: PillarsError) =
Some(ValuedEndpointOutput(statusCode.and(jsonBody[PillarsError.View]), (e.status, e.view)))

Expand Down
6 changes: 3 additions & 3 deletions modules/core/src/main/scala/pillars/Metrics.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import sttp.tapir.server.metrics.Metric
import sttp.tapir.server.metrics.MetricLabels
import sttp.tapir.server.model.ServerResponse

case class Metrics[F[_]: Applicative](meter: Meter[F], metrics: List[Metric[F, _]]):
case class Metrics[F[_]: Applicative](meter: Meter[F], metrics: List[Metric[F, ?]]):
/** The interceptor which can be added to a server's options, to enable metrics collection. */
def metricsInterceptor(ignoreEndpoints: Seq[AnyEndpoint] = Seq.empty): MetricsRequestInterceptor[F] =
new MetricsRequestInterceptor[F](metrics, ignoreEndpoints)
Expand Down Expand Up @@ -75,9 +75,9 @@ object Metrics:
duration <- requestDuration(meter)
requestSize <- requestBodySize(meter)
responseSize <- responseBodySize(meter)
yield Metrics(meter, List[Metric[F, _]](active, total, duration))
yield Metrics(meter, List[Metric[F, ?]](active, total, duration))

def init[F[_]: Applicative](meter: Meter[F], metrics: List[Metric[F, _]]): F[Metrics[F]] =
def init[F[_]: Applicative](meter: Meter[F], metrics: List[Metric[F, ?]]): F[Metrics[F]] =
Metrics(meter, metrics).pure[F]

def noop[F[_]: Applicative]: Metrics[F] = Metrics(Meter.noop[F], Nil)
Expand Down
2 changes: 1 addition & 1 deletion modules/example/src/main/resources/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bookstore
# tag::log[]
log:
level: info
level: debug
format: enhanced
output:
type: console
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package pillars.flags

import io.circe.Decoder
import io.circe.Decoder.Result
import io.circe.Json
import io.circe.syntax.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ final case class HttpClient[F[_]: Async](config: HttpClient.Config)(client: org.
callRequest(endpoint, uri)(interpreter.toSecureRequest(endpoint, uri)(securityInput)(input))
end callSecure

private[this] def callRequest[I, EO, O](
private def callRequest[I, EO, O](
endpoint: AnyEndpoint,
uri: Option[Uri],
handler: FailureHandler[F, EO, O] = FailureHandler.default[F, EO, O]
Expand Down Expand Up @@ -166,7 +166,7 @@ object HttpClient:
extends Error(endpoint, uri, ErrorNumber(1002), Message("Missing"))
case Multiple[R](endpoint: AnyEndpoint, uri: Option[Uri], vs: Seq[R])
extends Error(endpoint, uri, ErrorNumber(1003), Message("Multiple response"))
case InvalidInput(endpoint: AnyEndpoint, uri: Option[Uri], errors: List[ValidationError[_]])
case InvalidInput(endpoint: AnyEndpoint, uri: Option[Uri], errors: List[ValidationError[?]])
extends Error(endpoint, uri, ErrorNumber(1004), Message("Invalid input"))
case Mismatch(endpoint: AnyEndpoint, uri: Option[Uri], expected: String, actual: String)
extends Error(endpoint, uri, ErrorNumber(1005), Message("Type mismatch"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ case class RabbitMQConfig(
internalQueueSize: Option[Int :| Positive] = Some(1024),
requestedHeartbeat: FiniteDuration = 60 seconds,
automaticRecovery: Boolean = true,
automaticTopologyRecovery: Boolean = true,
clientProvidedConnectionName: Option[RabbitMQConnectionName] = None
) extends pillars.Config

Expand All @@ -112,6 +113,7 @@ object RabbitMQConfig:
internalQueueSize = cfg.internalQueueSize,
requestedHeartbeat = cfg.requestedHeartbeat,
automaticRecovery = cfg.automaticRecovery,
automaticTopologyRecovery = cfg.automaticTopologyRecovery,
clientProvidedConnectionName = cfg.clientProvidedConnectionName
)
end RabbitMQConfig
Expand Down
63 changes: 32 additions & 31 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import sbt.*

object Dependencies {
val effect: Seq[ModuleID] = Seq(
"org.typelevel" %% "cats-core" % "2.12.0",
"org.typelevel" %% "cats-effect" % "3.5.4",
"org.typelevel" %% "cats-effect" % "3.5.6",
"co.fs2" %% "fs2-core" % "3.11.0",
"org.typelevel" %% "cats-collections-core" % "0.9.8",
"org.typelevel" %% "cats-collections-core" % "0.9.9",
"org.typelevel" %% "cats-time" % "0.5.1"
)

Expand All @@ -25,46 +26,46 @@ object Dependencies {
"io.circe" %% "circe-core" % "0.14.10",
"io.circe" %% "circe-generic" % "0.14.10",
"io.circe" %% "circe-parser" % "0.14.10",
"io.circe" %% "circe-yaml" % "0.15.3"
"io.circe" %% "circe-yaml" % "0.16.0"
)

val http4s: Seq[ModuleID] = Seq(
"org.http4s" %% "http4s-core" % "0.23.28",
"org.http4s" %% "http4s-dsl" % "0.23.28",
"org.http4s" %% "http4s-circe" % "0.23.28"
"org.http4s" %% "http4s-core" % "0.23.29",
"org.http4s" %% "http4s-dsl" % "0.23.29",
"org.http4s" %% "http4s-circe" % "0.23.29"
)

val http4sClient: Seq[ModuleID] = Seq(
"org.http4s" %% "http4s-netty-client" % "0.5.19",
"com.softwaremill.sttp.tapir" %% "tapir-http4s-client" % "1.11.4",
"org.http4s" %% "http4s-netty-client" % "0.5.21",
"com.softwaremill.sttp.tapir" %% "tapir-http4s-client" % "1.11.9",
"com.alejandrohdezma" %% "http4s-munit" % "1.1.0" % Test
)
val http4sServer: Seq[ModuleID] = Seq(
"org.http4s" %% "http4s-netty-server" % "0.5.19"
"org.http4s" %% "http4s-netty-server" % "0.5.21"
)
val scodec: Seq[ModuleID] = Seq(
"org.scodec" %% "scodec-bits" % "2.2.2",
"org.scodec" %% "scodec-core" % "2.2.2"
"org.scodec" %% "scodec-core" % "2.3.2"
)

private val tapir = Seq(
"com.softwaremill.sttp.tapir" %% "tapir-http4s-server" % "1.11.4",
"com.softwaremill.sttp.tapir" %% "tapir-json-circe" % "1.11.4",
"com.softwaremill.sttp.tapir" %% "tapir-opentelemetry-metrics" % "1.11.4",
"com.softwaremill.sttp.tapir" %% "tapir-iron" % "1.11.4",
"com.softwaremill.sttp.tapir" %% "tapir-openapi-docs" % "1.11.4",
"com.softwaremill.sttp.apispec" %% "openapi-circe-yaml" % "0.11.3",
"com.softwaremill.sttp.tapir" %% "tapir-swagger-ui-bundle" % "1.11.4",
"com.softwaremill.sttp.tapir" %% "tapir-sttp-stub-server" % "1.11.4" % Test,
"com.softwaremill.sttp.client3" %% "core" % "3.9.8" % Test
"com.softwaremill.sttp.tapir" %% "tapir-http4s-server" % "1.11.9",
"com.softwaremill.sttp.tapir" %% "tapir-json-circe" % "1.11.9",
"com.softwaremill.sttp.tapir" %% "tapir-opentelemetry-metrics" % "1.11.9",
"com.softwaremill.sttp.tapir" %% "tapir-iron" % "1.11.9",
"com.softwaremill.sttp.tapir" %% "tapir-openapi-docs" % "1.11.9",
"com.softwaremill.sttp.apispec" %% "openapi-circe-yaml" % "0.11.3" exclude ("io.circe", "circe-yaml"),
"com.softwaremill.sttp.tapir" %% "tapir-swagger-ui-bundle" % "1.11.9",
"com.softwaremill.sttp.tapir" %% "tapir-sttp-stub-server" % "1.11.9" % Test,
"com.softwaremill.sttp.client3" %% "core" % "3.10.1" % Test
)

val logging: Seq[ModuleID] = Seq( //
"com.outr" %% "scribe" % "3.15.0",
"com.outr" %% "scribe-cats" % "3.15.0",
"com.outr" %% "scribe-slf4j" % "3.15.0",
"com.outr" %% "scribe-json-circe" % "3.15.0",
"com.outr" %% "scribe-file" % "3.15.0"
"com.outr" %% "scribe" % "3.15.2",
"com.outr" %% "scribe-cats" % "3.15.2",
"com.outr" %% "scribe-slf4j" % "3.15.2",
"com.outr" %% "scribe-json-circe" % "3.15.2",
"com.outr" %% "scribe-file" % "3.15.2"
)

val tests: Seq[ModuleID] = Seq(
Expand All @@ -81,13 +82,13 @@ object Dependencies {
)

val observability: Seq[ModuleID] = Seq(
"org.typelevel" %% "otel4s-sdk" % "0.8.1",
"org.typelevel" %% "otel4s-sdk-exporter" % "0.8.1"
"org.typelevel" %% "otel4s-sdk" % "0.11.1",
"org.typelevel" %% "otel4s-sdk-exporter" % "0.11.1"
)

val skunk: Seq[ModuleID] = Seq(
"org.tpolecat" %% "skunk-core" % "1.0.0-M7" exclude ("org.typelevel", "otel4s-core-trace"),
"org.tpolecat" %% "skunk-circe" % "1.0.0-M7"
"org.tpolecat" %% "skunk-core" % "1.0.0-M8",
"org.tpolecat" %% "skunk-circe" % "1.0.0-M8"
) ++ tests

val doobie: Seq[ModuleID] = Seq(
Expand All @@ -97,14 +98,14 @@ object Dependencies {

val migrationsRuntime: Seq[ModuleID] = Seq(
"org.postgresql" % "postgresql" % "42.7.4",
"org.flywaydb" % "flyway-database-postgresql" % "10.18.0"
"org.flywaydb" % "flyway-database-postgresql" % "11.0.0"
)
val migrations: Seq[ModuleID] = Seq(
"org.flywaydb" % "flyway-core" % "10.18.0"
"org.flywaydb" % "flyway-core" % "11.0.0"
) ++ tests ++ testContainers ++ migrationsRuntime.map(_ % Test)

val fs2Rabbit: Seq[ModuleID] = Seq(
"dev.profunktor" %% "fs2-rabbit" % "5.2.0"
"dev.profunktor" %% "fs2-rabbit" % "5.3.0"
) ++ tests ++ testContainers

val rediculous: Seq[ModuleID] = Seq(
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.10.2
sbt.version=1.10.4
Loading

0 comments on commit 02c8132

Please sign in to comment.