typelevel / typelevel/cats-effect

Document the behavior changes to `bracket/guarantee` between CE2 and CE3

Open Beginner friendly
#2,242 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

:books: docs
Dominant language
Scala
Stars
2.2k
Forks
576
Avg merge
2d 11h
Merged PRs (30d)
18

Description

EitherT.liftF[IO, String, Int](IO.pure(42)).guarantee(EitherT.leftT[IO, Unit]("Boom!")).value.unsafeRunSync()

This line evaluates to Left("Boom!") on CE2 and Right(42) on CE3.

The short circuiting behavior of monad transformers w.r.t. bracket/guarantee has changed and we should explain it in the migration guide.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the migration guide and review the provided EitherT example and its CE2 and CE3 results. Document the changed short-circuiting behavior of monad transformers with bracket/guarantee, including the shown outcome difference, so the migration guidance explains why the result changed.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.