From bdd806da56ba8adc1480a301889ab97ae721bb2b Mon Sep 17 00:00:00 2001 From: RenkuBot <53332360+RenkuBot@users.noreply.github.com> Date: Thu, 24 Oct 2024 15:21:18 +0200 Subject: [PATCH] chore: Update scala-library from 2.13.14 to 2.13.15 (#1959) * chore: Update scala-library from 2.13.14 to 2.13.15 * Fix compile error due to new scala version --------- Co-authored-by: RenkuBot Co-authored-by: Eike --- build.sbt | 2 +- .../scala/io/renku/eventlog/init/TimestampZoneAdder.scala | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/build.sbt b/build.sbt index 894e36feac..438c24a522 100644 --- a/build.sbt +++ b/build.sbt @@ -18,7 +18,7 @@ organization := "io.renku" name := "renku-graph" -ThisBuild / scalaVersion := "2.13.14" +ThisBuild / scalaVersion := "2.13.15" // This project contains nothing to package, like pure POM maven project packagedArtifacts := Map.empty diff --git a/event-log/src/main/scala/io/renku/eventlog/init/TimestampZoneAdder.scala b/event-log/src/main/scala/io/renku/eventlog/init/TimestampZoneAdder.scala index 0fb8b02125..218408396c 100644 --- a/event-log/src/main/scala/io/renku/eventlog/init/TimestampZoneAdder.scala +++ b/event-log/src/main/scala/io/renku/eventlog/init/TimestampZoneAdder.scala @@ -19,7 +19,6 @@ package io.renku.eventlog.init import cats.data.Kleisli -import cats.data.Kleisli._ import cats.effect.MonadCancelThrow import cats.syntax.all._ import io.renku.eventlog.EventLogDB.SessionResource @@ -56,13 +55,13 @@ private class TimestampZoneAdderImpl[F[_]: MonadCancelThrow: Logger: SessionReso private def migrateIfNeeded(table: String, column: String): Kleisli[F, Session[F], Unit] = { findCurrentType(table, column) >>= { case "timestamp with time zone" => - liftF(Logger[F].info(s"$table.$column already migrated to 'timestamp with time zone'")) + Kleisli.liftF(Logger[F].info(s"$table.$column already migrated to 'timestamp with time zone'")) case columnType => - liftF[F, Session[F], Unit](Logger[F].info(s"$table.$column in '$columnType', migrating")) >>= + Kleisli.liftF[F, Session[F], Unit](Logger[F].info(s"$table.$column in '$columnType', migrating")) >>= (_ => migrate(table, column)) } } recoverWith { case NonFatal(e) => - liftF(Logger[F].error(e)(s"$table.$column migration failed")) >> liftF(e.raiseError[F, Unit]) + Kleisli.liftF(Logger[F].error(e)(s"$table.$column migration failed") >> e.raiseError[F, Unit]) } private def findCurrentType(table: String, column: String): Kleisli[F, Session[F], String] = {