Skip to content

Releases: kevin-lee/effectie

v2.0.0-beta5

13 Jan 18:11
144978e
Compare
Choose a tag to compare

2.0.0-beta5 - 2023-01-14

New Features

  • Add ResourceMaker (#468)

    ResourceMaker[F].forAutoCloseable[A <: AutoCloseable](fa: F[A]): ReleasableResource[F, A]
    import effectie.resource.ResourceMaker
    
    ResourceMaker.usingResourceMaker // ResourceMaker[Try]
    ResourceMaker.futureResourceMaker(implicit ec: ExecutionContext) // ResourceMaker[Future]
    import effectie.resource.Ce2ResourceMaker
    
    Ce2ResourceMaker.forAutoCloseable // ResourceMaker[F] where F[*]: Sync: BracketThrow
    import effectie.resource.Ce3Resource
    
    Ce3Resource.forAutoCloseable // ResourceMaker[F] where F[*]: Sync: MonadCancelThrow

Internal Housekeeping

  • cats-effect 3.3.5 => 3.3.14

v2.0.0-beta4

25 Dec 12:17
2a49b02
Compare
Choose a tag to compare

2.0.0-beta4 - 2022-12-25 🎄

Changes

  • Update missing implicit instance messages for Scala 3 (#454)
    e.g.)
    import effectie.instances.ce2.fx.*
    to
    import effectie.instances.ce2.fx.given
  • Change f in def catchNonFatal[A, B](fb: => F[B])(f: Throwable => A): F[Either[A, B]] to f: PartialFunction[Throwable, AA] (#457)
    CanCatch[F].catchNonFatal(fa) {
      case FooException(err) =>
        FooError(err)
    }
    // If fa throws FooException, the result is F[Either[FooError, A]]
    // If fa throws some other exception, the result is F[Either[FooError, A]] but it's actually the same as errorOf[Either[FooError, A]](theException) so the exception is not caught in Either.

v2.0.0-beta3

13 Nov 12:24
c6db05d
Compare
Choose a tag to compare

2.0.0-beta3 - 2022-11-13

Packages

  • Reorganize instances - move to effectie.instances (#429)
    • effectie.instances.future
    • effectie.instances.ce2
    • effectie.instances.ce3
    • effectie.instances.monix3
    • effectie.instances.id

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

  • Add ReleasableResource to automatically release resource after use (#443)
    • For cats-effect it should use cats.effect.Resource as its implementation
    • For non-cats-effect, use Scala's scala.util.Using and Future with proper resource release

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]

v2.0.0-beta2

19 Sep 15:04
dbf2979
Compare
Choose a tag to compare

2.0.0-beta2 - 2022-09-20

Renaming

Rename modules and packages (#430)

Modules

  • effectie-cats => effectie-syntax
  • effectie-cats-effect => effectie-cats-effect2
  • effectie-cats-effect3 remains the same
  • effectie-monix => effectie-monix3

Packages

  • Cats Effect 2: effectie.cats => effectie.ce2
  • Cats Effect 3: effectie.cats => effectie.ce3
  • Monix 3: effectie.monix => effectie.monix3

Project Structure Change

  • Use effectie-cats-effect common code for effectie-monix (#425)

Added

  • Add FxCtor.pureOrError(a) and Fx.pureOrError(a) (#424)
    FxCtor[IO].pureOrError(1)
    // IO[Int] = Pure(1)
    
    FxCtor[IO].pureOrError[Int]((throw new RuntimeException("ERROR")): Int)
    // IO[Int] = RaiseError(java.lang.RuntimeException("ERROR"))

Clean up

  • Clean up syntax (#421)
  • syntax should have cats (#432)
    • (effectie.cats.syntax and effectie.syntax) => effectie.syntax

Documentation

  • Upgrade docs site to Docusaurus 2.0.0-rc.1 (#415)

v2.0.0-beta1

02 May 11:12
680fad8
Compare
Choose a tag to compare

2.0.0-beta1 - 2022-05-02

Done

  • Make Fx CanCatch (#301)
  • Make Fx CanHandleError (#302)
  • Make Fx CanRecover (#303)
  • core project should be effect library free (#304)
  • Sub-projects for Cats Effect and Monix (#305)
  • Remove EffectConstructor (#306)
  • Withdraw Scalaz Effect support (#308)
  • Remove Xor (#310)
  • Remove OptionTSupport (#314)
  • Remove EitherTSupport (#315)
  • Remove Fx, FxCtor and CanCatch traits from effectie-cats-effect, effectie-cats-effect3 and effectie-monix (#320)
  • Remove CanHandleError and CanRecover traits from effectie-cats-effect, effectie-cats-effect3 and effectie-monix (#322)
  • Add missing type class instances and fix tests (#326)
  • Remove unused libraries for testing code using cats-effect3 (#328)
  • Set up Codecov in GitHub Actions (#339)
  • Publish to s01.oss.sonatype.org (the new Maven central) (#342)
  • Use extras-concurrent and extras-concurrent-testing for testing (#348)
  • Test typeclasses for Future in the core project (#350)
  • Change Effectful to fx and move to core / also move possible error syntax to core (#352)
  • Rename the package of the core from effectie to effectie.core (#358)
  • Redesign ConsoleEffect and ConsoleEffectful (#364)
  • Move FromFuture and ToFuture to core and leave only typeclass instances in the sub-projects (#367)
  • Uncapitalize typeclass instance names for Scala 2 (#371)
  • Move all sub-projects to modules (#373)
  • Upgrade cats to 2.7.0 (#377)
  • Add effectie-cats for cats specific code (#384)
  • Add Scalafix and Scalafmt checks (#386)
  • Support Scala.js (#388)
  • Add fromEither, fromOption and fromTry to FxCtor and Fx (#393)

v1.16.0

31 Oct 10:56
a87f007
Compare
Choose a tag to compare

1.16.0 - 2021-10-31 🎃

Done

  • Add catchNonFatalThrowable (#274)
  • Add syntax for error handling (#277)
  • Add AA >: A to catchNonFatalEither and catchNonFatalEitherT (#279)
  • Add handleError for F[Xor[A, B]] (#281)
  • Add recoverFrom for F[Xor[A, B]] (#283)
  • More abstraction for CanRecover (#284)
  • More abstraction for CanHandleError (#287)
  • More abstraction for CanCatch (#289)
  • Add Fx.errorOf(Throwable) (#294)

v1.15.0

12 Aug 12:30
f85c996
Compare
Choose a tag to compare

1.15.0 - 2021-08-12

Done

  • Fix CommonFutureFx to use Future.successful for pureOf (#257)
  • Add project to test cats related code (#259)
  • Add FxCtor as an alternative to EffectConstructor (#261)
  • Fx should no longer be Monad (#265)
  • There should be a way to test each Monad law instead of testing all the laws at once. (#266)
  • Make Fx Monad (#256) (Undone in favor of #265)

v1.14.0

29 Jul 12:04
bfffcaf
Compare
Choose a tag to compare

1.14.0 - 2021-07-29

Done

  • Use Scala 3 syntax for effectie-cats-effect (#249)
  • Use Scala 3 syntax for effectie-cats-effect3 (#250)

v1.13.0

24 Jul 10:11
129382f
Compare
Choose a tag to compare

1.13.0 - 2021-07-24

Done

  • Drop Scala 2.11 support (#242)
  • Support Cats Effect 3 (#229)

v1.12.0

23 Jul 11:52
7b7a7d2
Compare
Choose a tag to compare

1.12.0 - 2021-07-23

Done

  • Add a shorter alternative name to EffectConstructor (#220)
  • Rename Eft Fx (#234)
  • Add EitherT extension methods (#230)
    val fab: F[Either[A, B]] = ???
    fab.eitherT // EitherT[F, A, B]
    
    val ab: Either[A, B] = ???
    ab.eitherT[F] // Either[F, A, B]
    
    val fb: F[B] = ???
    fb.rightT[A] // EitherT[F, A, B]
    
    val b = ???
    b.rightTF[F, A] // EitherT[F, A, B]
    
    val fa: F[A] = ???
    fa.leftT[B] // EitherT[F, A, B]
    
    val a: A = ???
    a.leftTF[F, B] // EitherT[F, A, B]
  • Add OptionT extension methods (#231)
    val foa: F[Option[A]] = ???
    foa.optionT // OptionT[F, A]
    
    val oa: Option[A] = ???
    oa.optionT[F] // Option[F, A]
    
    val fa: F[A] = ???
    fa.someT OptionT[F, A] // OptionT[F, A]
    
    val a = ???
    a.someTF[F] // OptionT[F, A]
  • YesNo in Scala 3 should derive CanEqual (#237)