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

Upgrade cats-effect to 3.2.8 #253

Merged
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
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ If you are using [`cats.effect.IO`], or some other type `F[_]` that provides a
[`cats.ApplicativeError`], you can use the following:

```scala
scala> import cats.effect.unsafe.implicits.global
scala> import cats.effect.IO
scala> import io.circe.generic.auto._
scala> import io.circe.config.parser
Expand All @@ -87,8 +88,8 @@ res1: AppSettings = AppSettings(HttpSettings(ServerSettings(localhost,8080),Some
scala> parser.decodePathF[IO, ServerSettings]("http.server")
res2: cats.effect.IO[ServerSettings] = IO(ServerSettings(localhost,8080))

scala> parser.decodePathF[IO, ServerSettings]("path.not.found")
res3: cats.effect.IO[ServerSettings] = IO(throw io.circe.ParsingFailure: Path not found in config)
scala> parser.decodePathF[IO, ServerSettings]("path.not.found").attempt.unsafeRunSync()
res3: Either[Throwable,ServerSettings] = Left(io.circe.ParsingFailure: Path not found in config)
```

This makes the configuration directly available in your `F[_]`, such as `cats.effect.IO`, which handles any errors.
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ThisBuild / tlMimaPreviousVersions ++= Set(
)

val Versions = new {
val catsEffect = "2.5.5"
val catsEffect = "3.2.8"
val circe = "0.14.3"
val config = "1.4.2"
val discipline = "1.4.0"
Expand Down
1 change: 1 addition & 0 deletions config/src/main/scala/io.circe.config/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import config.compat.converters._
*
* @example
* {{{
* scala> import cats.effect.unsafe.implicits.global
* scala> import com.typesafe.config.ConfigFactory
* scala> import io.circe.generic.auto._
* scala> import io.circe.config.syntax._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
package io.circe.config

import cats.effect.IO
import cats.effect.unsafe.implicits.global
import com.typesafe.config.{parser => _, _}
import io.circe.config.syntax._
import io.circe.generic.auto._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
package io.circe.config

import cats.effect.IO
import cats.effect.unsafe.implicits.global
import com.typesafe.config.{parser => _, _}
import io.circe.config.syntax._
import io.circe.syntax._
Expand Down