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

effectie v2.0.0-beta3 #449

Merged
merged 1 commit into from
Nov 13, 2022
Merged

effectie v2.0.0-beta3 #449

merged 1 commit into from
Nov 13, 2022

Conversation

kevin-lee
Copy link
Owner

effectie v2.0.0-beta3

2.0.0-beta3 - 2022-11-13

Packages

Details

  • move to effectie.instances: Move instances for Future to effectie.instances.future
  • Also add @implicitNotFound to show what to import
  • move to effectie.instances: Move instances for Id to effectie.instances.id
  • Remove instances for Id for Cats Effect 2 and 3 since they are now in the effectie-cats
  • Move ConsoleEffect instance to effectie.instances
  • Also effectie.instances.future.fromFuture.FromFutureToIdTimeout => effectie.core.FromFuture.FromFutureToIdTimeout
  • Remove instances for Id for Monix since they are now in the effectie-cats
  • Remove instances for IO for Monix since they are now in the effectie-cats-effect2
  • Move instances for IO and Task to effectie.instances

Added

ReleasableResource with Using and Try

import effectie.resource.ReleasableResource

ReleasableResource.usingResource(SomeAutoCloseable())
  .use { resource =>
    Try(resource.doSoemthing()) // Try[A]
  } // Try[A]

// OR

val trySomeResource: Try[SomeResource] = ...
ReleasableResource.usingResourceFromTry(trySomeResource)
  .use { resource =>
    Try(resource.doSoemthing()) // Try[A]
  } // Try[A]

ReleasableResource with Future

import effectie.resource.ReleasableResource
val futureResource: Future[SomeResource] = ...

ReleasableResource.futureResource(futureResource)
  .use { resource =>
    Future(doSomething(resource)) // Future[A]
  } // Future[A]

ReleasableResource with Cats Effect IO

  • Cats Effect 2

    import effectie.resource.Ce2Resource
    
    val fa: F[SomeResource] = ...
    
    Ce2Resource.fromAutoCloseable(fa)
      .use { resource =>
        Sycn[F].delay(doSomething(resource)) // F[A]
      } // F[A]
  • Cats Effect 3

    import effectie.resource.Ce3Resource
    
    val fa: F[SomeResource] = ...
    
    Ce3Resource.fromAutoCloseable(fa)
      .use { resource =>
        Sycn[F].delay(doSomething(resource)) // F[A]
      } // F[A]

@kevin-lee kevin-lee added this to the v2-m1 milestone Nov 13, 2022
@kevin-lee kevin-lee self-assigned this Nov 13, 2022
@github-actions github-actions bot added pr PR release Release v2 Effectie v2 labels Nov 13, 2022
@codecov
Copy link

codecov bot commented Nov 13, 2022

Codecov Report

Base: 88.11% // Head: 88.11% // No change to project coverage 👍

Coverage data is based on head (7c8510f) compared to base (813d34c).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #449   +/-   ##
=======================================
  Coverage   88.11%   88.11%           
=======================================
  Files          35       35           
  Lines         143      143           
  Branches       10       10           
=======================================
  Hits          126      126           
  Misses         17       17           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@kevin-lee kevin-lee merged commit 582b0d9 into main Nov 13, 2022
@kevin-lee kevin-lee deleted the prepare-to-release branch November 13, 2022 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr PR release Release v2 Effectie v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant