diff --git a/build.sbt b/build.sbt index 85a9319f..57a9f859 100644 --- a/build.sbt +++ b/build.sbt @@ -4,7 +4,7 @@ import Dependencies._ import microsites.ExtraMdFileConfig ThisBuild / name := """fs2-rabbit""" -ThisBuild / crossScalaVersions := List("2.12.12", "2.13.3") +ThisBuild / crossScalaVersions := List("2.12.12", "2.13.5") ThisBuild / organization := "dev.profunktor" ThisBuild / homepage := Some(url("https://fs2-rabbit.profunktor.dev/")) ThisBuild / licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")) @@ -38,6 +38,7 @@ val commonSettings = List( headerLicense := Some(HeaderLicense.ALv2("2017-2020", "ProfunKtor")), scalacOptions in (Compile, doc) ++= List("-no-link-warnings"), scalacOptions ++= maxClassFileName(scalaVersion.value), + scalacOptions in (Compile, compile) --= List("-Wunused:params"), libraryDependencies ++= { List( compilerPlugin(Libraries.kindProjector), @@ -52,7 +53,7 @@ val commonSettings = List( }, resolvers += "Apache public" at "https://repository.apache.org/content/groups/public/", scalafmtOnCompile := true, - mimaPreviousArtifacts := Set(organization.value %% moduleName.value % "3.0.1"), + mimaPreviousArtifacts := Set(organization.value %% moduleName.value % "3.0.1") ) def CoreDependencies(scalaVersionStr: String): List[ModuleID] = diff --git a/core/src/main/scala/dev/profunktor/fs2rabbit/algebra/Connection.scala b/core/src/main/scala/dev/profunktor/fs2rabbit/algebra/Connection.scala index 3dcdf226..31545358 100644 --- a/core/src/main/scala/dev/profunktor/fs2rabbit/algebra/Connection.scala +++ b/core/src/main/scala/dev/profunktor/fs2rabbit/algebra/Connection.scala @@ -40,8 +40,8 @@ object ConnectionResource { ): F[Connection[Resource[F, *]]] = { val addThreadFactory: F[ConnectionFactory => Unit] = threadFactory.fold(Sync[F].pure((_: ConnectionFactory) => ())) { threadFact => - threadFact.map { tf => - (cf: ConnectionFactory) => cf.setThreadFactory(tf) + threadFact.map { tf => (cf: ConnectionFactory) => + cf.setThreadFactory(tf) } } addThreadFactory.flatMap { fn => @@ -56,12 +56,12 @@ object ConnectionResource { } private def _make[F[_]: Sync: Log]( - conf: Fs2RabbitConfig, - sslCtx: Option[SSLContext], - saslConf: SaslConfig, - metricsCollector: Option[MetricsCollector], - addThreadFactory: ConnectionFactory => Unit - ): F[Connection[Resource[F, *]]] = { + conf: Fs2RabbitConfig, + sslCtx: Option[SSLContext], + saslConf: SaslConfig, + metricsCollector: Option[MetricsCollector], + addThreadFactory: ConnectionFactory => Unit + ): F[Connection[Resource[F, *]]] = Sync[F] .delay { val factory = new ConnectionFactory() @@ -115,7 +115,6 @@ object ConnectionResource { } } } - } } trait Connection[F[_]] { diff --git a/core/src/main/scala/dev/profunktor/fs2rabbit/arguments.scala b/core/src/main/scala/dev/profunktor/fs2rabbit/arguments.scala index a4b6b2a7..b4175283 100644 --- a/core/src/main/scala/dev/profunktor/fs2rabbit/arguments.scala +++ b/core/src/main/scala/dev/profunktor/fs2rabbit/arguments.scala @@ -21,11 +21,10 @@ import dev.profunktor.fs2rabbit.javaConversion._ object arguments { - /** - * [[SafeArg]] makes sure the arguments passed to any of the functions are compliant with the AMQP Protocol. + /** [[SafeArg]] makes sure the arguments passed to any of the functions are compliant with the AMQP Protocol. * * This library only supports String, Boolean, Int, Long, Float, Short, BigDecimal, Date, Byte, List and Map. - * */ + */ type SafeArg = Evidence[SafeArgument] type Arguments = Map[String, SafeArg] diff --git a/core/src/main/scala/dev/profunktor/fs2rabbit/interpreter/RabbitClient.scala b/core/src/main/scala/dev/profunktor/fs2rabbit/interpreter/RabbitClient.scala index 1964dd8b..f03f8960 100644 --- a/core/src/main/scala/dev/profunktor/fs2rabbit/interpreter/RabbitClient.scala +++ b/core/src/main/scala/dev/profunktor/fs2rabbit/interpreter/RabbitClient.scala @@ -84,7 +84,7 @@ object RabbitClient { } } -class RabbitClient[F[_]: Concurrent] private[fs2rabbit] ( +class RabbitClient[F[_]] private[fs2rabbit] ( connection: ConnectionResource[F], consume: Consume[F], publish: Publish[F], diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 1b9ff270..a86d68a3 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -18,10 +18,10 @@ object Dependencies { val kindProjector = "0.11.3" val betterMonadicFor = "0.3.1" - val scalaTest = "3.2.4" + val scalaTest = "3.2.5" val scalaCheck = "1.15.2" val scalaTestPlusScalaCheck = "3.2.2.0" - val disciplineScalaCheck = "2.1.1" + val disciplineScalaCheck = "2.1.2" } object Libraries {