I have a http4s project which uses ciris for configuration management.
The project is in github here.
libraryDependencies ++= Seq(
"is.cir" %% "ciris-cats",
"is.cir" %% "ciris-cats-effect",
"is.cir" %% "ciris-core",
"is.cir" %% "ciris-enumeratum",
"is.cir" %% "ciris-refined"
).map(_ % "0.12.1")
libraryDependencies ++= Seq(
"org.http4s" %% "http4s-dsl",
"org.http4s" %% "http4s-blaze-server"
).map(_ % "0.18.18")
libraryDependencies ++= Seq(
"com.ovoenergy" %% "ciris-kubernetes" % "0.5",
"org.typelevel" %% "kittens" % "1.2.0",
"eu.timepit" %% "refined-cats" % "0.9.3"
)
When I compile my project I get below error here
[info] Compiling 12 Scala sources to /Users/rajkumar.natarajan/Documents/Coding/OS/ciris-example/target/scala-2.12/classes ...
[error] /Users/rajkumar.natarajan/Documents/Coding/OS/ciris-example/src/main/scala/is/cir/example/application/Http4sApi.scala:24:68: Cannot find an implicit value for ContextShift[cats.effect.IO]:
[error] * import ContextShift[cats.effect.IO] from your effects library
[error] * if using IO, use cats.effect.IOApp or build one with cats.effect.IO.contextShift
[error] implicit val ioConcurrentEffect: Concurrent[IO] = cats.effect.IO.ioConcurrentEffect
[error] ^
[error] /Users/rajkumar.natarajan/Documents/Coding/OS/ciris-example/src/main/scala/is/cir/example/application/Http4sApi.scala:43:69: type mismatch;
[error] found : (ec: scala.concurrent.ExecutionContext, sc: java.util.concurrent.ScheduledExecutorService)cats.effect.Timer[cats.effect.IO] <and> (ec: scala.concurrent.ExecutionContext)cats.effect.Timer[cats.effect.IO]
[error] required: cats.effect.Timer[cats.effect.IO]
[error] Timeout(finite)(service)(ioConcurrentEffect, cats.effect.IO.timer)
[error] ^
The reason is I'm missing implicit parameter which needed by the function here
The error tells me to use use cats.effect.IOApp or build one with cats.effect.IO.contextShift
but couldn't find cats.effect.IOApp
or cats.effect.IO.contextShift
Any Help is appreciated.