13.0.0.0
This is a first release of a new 13.*
series of interop-cats for ZIO 1.0 & Cats Effect 3. It contains breaking changes with respect to the previous 3.2.9.1
release for ZIO1/CE3 pair.
New versioning scheme
After the release of ZIO 2.0 the previous versioning scheme that mirrored the CE version became insufficient to accomodate the four concurrent ZIO+CE pairs that interop-cats is now released for. We adopt a new versioning scheme <epoch>.<major>.<minor>.<patch>
, where 'epoch' is a ZIO+CE pair, with 12
=ZIO1/CE2, 13
=ZIO1/CE3, 22
=ZIO2/CE2, 23
=ZIO2/CE3.
Breaking Changes
-
GenTemporal[IO[E, _], E]
andGenConcurrent[IO[E, _], E]
instances for the generic, non-Throwable, error typeE
have been removed from the default implicit scope ofzio.interop.catz
(#543)- Instead, instances for
GenTemporal[IO[E, _], Cause[E]]
andGenConcurrent[IO[E, _], Cause[E]]
are now available by importingzio.interop.catz.generic._
:object generic { implicit final def concurrentInstanceCause[R, E]: GenConcurrent[ZIO[R, E, _], Cause[E]] = ... implicit final def temporalInstanceCause[R, E]: GenTemporal[ZIO[R, E, _], Cause[E]] = .. }
- These instances differ from default instances in
zio.interop.catz
object – they can catch allCause
errors - defects, internal interruptions, etc. not just errors produced byZIO.fail
.
- Instead, instances for
-
When using
bracketCase
,guaranteeCase
orcats.effect.Fiber#join
, now all ZIO error states, except for external interruption by another fiber, are translated toOutcome.Errored
. Before a failure produced byZIO.die
would be translated toOutcome.Succeeded
, and an internal interruption produced byZIO.interrupt
would be translated toOutcome.Canceled
. Both of these translations could undermine resource safety when a finalizer relies on Outcome.Succeded to judge whether resource cleanup is necessary. Now both of these states translate toOutcome.Errored
(#543)
Compatibility Improvements
MonadCancel#canceled
method is now implemented lawfully (#544 #503)Async#async
method now respects the returned finalizer (#542 #541 #509)- Disrepancies and law failures have been fixed in implementations of multiple methods (#549 #544 #543)
Other
- Known disrepancies still remain in interactions between
Fiber#join
and untyped ZIO errors (ZIO.die & ZIO.interrupt) (https://github.com/zio/interop-cats/pull/549/files#diff-0484e29adfb5bc11e3ba0d83952ea935b4726e54bfa878536f1393f9e50fe026R41)
Full Changelog: v3.2.9.1...v13.0.0.0