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

Update scala-library to 2.13.5 #80

Merged
merged 4 commits into from
Mar 28, 2021
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 build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ThisBuild / scalaVersion := "2.13.4"
ThisBuild / scalaVersion := "2.13.5"
ThisBuild / organization := "dev.usommerl"
ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.5.0"

Expand Down Expand Up @@ -48,7 +48,7 @@ lazy val graalnative4s = project
buildInfoPackage := organization.value,
buildInfoOptions ++= Seq[BuildInfoOption](BuildInfoOption.BuildTime),
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision,
semanticdbVersion := "4.4.10",
docker / dockerfile := NativeDockerfile(file("Dockerfile")),
docker / imageNames := Seq(ImageName(s"ghcr.io/usommerl/${name.value}:${dockerImageTag}")),
docker / dockerBuildArguments := sys.env.get(upx).map(s => Map("upx_compression" -> s)).getOrElse(Map.empty),
Expand Down
8 changes: 4 additions & 4 deletions src/main/scala/app/Api.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package app

import cats.Applicative
import cats.data.Kleisli
import cats.effect.{Concurrent, ContextShift, Sync, Timer}
import cats.effect.{Concurrent, ContextShift, Timer}
import cats.implicits._
import dev.usommerl.BuildInfo
import eu.timepit.refined.api.Refined
Expand All @@ -28,7 +28,7 @@ import sttp.tapir.server.http4s._
import sttp.tapir.swagger.http4s.SwaggerHttp4s

object Api {
def apply[F[_]: Sync: Concurrent: ContextShift: Timer](config: ApiDocsConfig): Kleisli[F, Request[F], Response[F]] = {
def apply[F[_]: Concurrent: ContextShift: Timer](config: ApiDocsConfig): Kleisli[F, Request[F], Response[F]] = {

val dsl = Http4sDsl[F]
import dsl._
Expand All @@ -49,7 +49,7 @@ object Api {
}

object Examples {
def apply[F[_]: Sync: Concurrent: ContextShift: Timer]()(implicit F: Applicative[F]) = new TapirApi[F] {
def apply[F[_]: Concurrent: ContextShift: Timer]()(implicit F: Applicative[F]) = new TapirApi[F] {
override val tag = Tag("Getting started", None)
override lazy val serverEndpoints = List(info, hello)
type NonEmptyString = String Refined NonEmpty
Expand Down Expand Up @@ -97,7 +97,7 @@ object Examples {
}
}

abstract class TapirApi[F[_]: Sync: Concurrent: ContextShift: Timer] {
abstract class TapirApi[F[_]: Concurrent: ContextShift: Timer] {
def tag: Tag
def serverEndpoints: List[ServerEndpoint[_, _, _, Any, F]]
def endpoints: List[Endpoint[_, _, _, _]] = serverEndpoints.map(_.endpoint)
Expand Down
8 changes: 4 additions & 4 deletions src/main/scala/app/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ object Main extends IOApp {

private def runF[F[_]: ContextShift: ConcurrentEffect: Timer]: Resource[F, Unit] =
for {
config <- app.config.resource[F]
implicit0(logger: Logger[F]) <- createLogger[F](config.logger)
_ <- Resource.liftF(logger.info(startMessage))
_ <- serve[F](config.server)
config <- app.config.resource[F]
logger <- createLogger[F](config.logger)
_ <- Resource.liftF(logger.info(startMessage))
_ <- serve[F](config.server)
} yield ()

private def createLogger[F[_]: ConcurrentEffect: Timer](config: LoggerConfig): Resource[F, Logger[F]] =
Expand Down