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

Implement a safer Resource.attempt which releases acquired resource(s) in case of error #4128

Open
wants to merge 12 commits into
base: series/3.x
Choose a base branch
from

Commits on Sep 2, 2024

  1. Implement a safer Resource.attempt, fix typelevel#3757

    Which releases acquired resource(s) in case of error and `MonadCancelThrow`
    constrain is required in order to do that. This also take away implicit
    `ApplicativeError` and deprecated the current attempt method.
    lenguyenthanh committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    8d16f92 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2024

  1. Configuration menu
    Copy the full SHA
    07fa387 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2839446 View commit details
    Browse the repository at this point in the history
  3. Implement handleErrorWith with MonadCancelThrow

    Deprecated handleErrorWith with ApplicativeError
    lenguyenthanh committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    3c2d6af View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cb1a293 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2024

  1. Best effort to improve deprecated attempt

    Fix F is `Sync`, We know that it has to be a `MonadCancelThrow`,
    therefore We can use safer attempt and `unsafely` cast the result.
    lenguyenthanh committed Sep 7, 2024
    Configuration menu
    Copy the full SHA
    3b7d0ee View commit details
    Browse the repository at this point in the history
  2. Deprecate catsEffectMonadErrorForResource

    Also remove implicit modifier from it.
    lenguyenthanh committed Sep 7, 2024
    Configuration menu
    Copy the full SHA
    206020c View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2024

  1. Apply suggestions from code review

    Co-authored-by: Arman Bilge <[email protected]>
    lenguyenthanh and armanbilge authored Sep 8, 2024
    Configuration menu
    Copy the full SHA
    cd729a5 View commit details
    Browse the repository at this point in the history
  2. Revert implicit for Resource MonadError instance

    MonadCancelThrow instance (which is required for the fixed attempt)
    is already higher priority than this one. By leaving it implicit,
    users will get an actionable deprecation instead of non-compiling code.
    lenguyenthanh committed Sep 8, 2024
    Configuration menu
    Copy the full SHA
    f00b9cd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    40cb12a View commit details
    Browse the repository at this point in the history
  4. Fix compilation error

    lenguyenthanh committed Sep 8, 2024
    Configuration menu
    Copy the full SHA
    840514d View commit details
    Browse the repository at this point in the history
  5. Better deprecated message

    Co-authored-by: Arman Bilge <[email protected]>
    lenguyenthanh and armanbilge committed Sep 8, 2024
    Configuration menu
    Copy the full SHA
    6bda660 View commit details
    Browse the repository at this point in the history