ZIO — A type-safe, composable library for async and concurrent programming in Scala
We found a regression in 2.1.0-RC2 causing compile errors with ZLayer.make
or ZIO#provide
. The change causing these errors has been reverted and we're making a RC3 right away so that more people can test the recent runtime improvements.
Full Changelog: https://github.com/zio/zio/compare/v2.1.0-RC2...v2.1.0-RC3
This release candidate builds on the previous ZIO runtime system improvements delivered in the 2.1-RC1 to add major improvements in forking and joining fibers. Our ForkJoin
benchmark is about 6x faster than in 2.0.x, and close to 20x faster when you disable FiberRoots
(which is recommended for high performance).
We've also changed the default behavior to disable auto-blocking detection by default because it could cause some performance degradation in some cases. Better heuristics might be introduced in the future, but in the meantime you can enable it by using the Runtime.enableAutoBlockingExecutor
aspect. We also added an optional executor based on Loom that you can use if your Java version is 21 or higher. It looks like our default ZScheduler
is faster when forking a lot of fibers, but depending on your use case, you might want to try this new executor using the Runtime.enableLoomBasedExecutor
aspect.
Because of the amount of changes, we decided to release a new release candidate first, and hope to get people to test it and report any issue. We will probably do a minor RC3 with a few fixes but are hoping to release 2.1.0 soon. Note that this version is binary compatible with 2.0.x with the exception of a few internal classes that should not be used anywhere else, but if you find any incompatibility issue, please let us know.
Known issues:
asBase64String
to Chunk
by @987Nabil in https://github.com/zio/zio/pull/8606
TestSelector
by @Duhemm in https://github.com/zio/zio/pull/8633
FiberRuntime
optimizations by @kyri-petrou in https://github.com/zio/zio/pull/8671
Exception in thread "zio-fiber-X"
instead of the interruptor fiber by @neko-kai in https://github.com/zio/zio/pull/8687
FiberRuntime.MaxTrampolinesBeforeYield
constant by @guizmaii in https://github.com/zio/zio/pull/8756
FiberId#isNone
by @guizmaii in https://github.com/zio/zio/pull/8746
ZIO#absolve
by @kyri-petrou in https://github.com/zio/zio/pull/8759
v2.0.x
for methods used in zio/interop-cats
by @kyri-petrou in https://github.com/zio/zio/pull/8757
Runtime#unsafe.fork
and Runtime#unsafe.runToFuture
by @kyri-petrou in https://github.com/zio/zio/pull/8752
Full Changelog: https://github.com/zio/zio/compare/v2.1-RC1...v2.1.0-RC2
This release contains a few performance improvements that were backported to the 2.0.x branch so you can benefit from them sooner (the "current" branch is for 2.1.x, for which a RC2 will probably be released in the coming weeks). These changes, in particular the FiberRuntime
one, have shown a ~10-15% improvement in some benchmarks.
FiberRuntime
optimizations by @kyri-petrou in https://github.com/zio/zio/pull/8672
ZEnvironment.get
by @ghostdogpr in https://github.com/zio/zio/pull/8712
Chunk.single
rather than Chunk.apply
by @ghostdogpr in https://github.com/zio/zio/pull/8718
Full Changelog: https://github.com/zio/zio/compare/v2.0.21...v2.0.22
Full Changelog: https://github.com/zio/zio/compare/v2.0.20...v2.0.21
Full Changelog: https://github.com/zio/zio/compare/v2.0.20...v2.1-RC1
contains
in an assertion to be passed a subtype when there's … by @shawjef3 in https://github.com/zio/zio/pull/8561
Full Changelog: https://github.com/zio/zio/compare/v2.0.19...v2.0.20
Full Changelog: https://github.com/zio/zio/compare/v2.0.18...v2.0.19
Full Changelog: https://github.com/zio/zio/compare/v2.0.17...v2.0.18
Clock::currentTime
: Avoid calling unit.convert
when the passed TimeUnit
is MILLISECONDS
by @guizmaii in https://github.com/zio/zio/pull/8358
Full Changelog: https://github.com/zio/zio/compare/v2.0.16...v2.0.17
ZSink::fold
code by @guizmaii in https://github.com/zio/zio/pull/8208
ZLayer#toManaged
by @neko-kai in https://github.com/zio/zio/pull/8211
ZLayer.derive
to handle arity 0 case classes (#8236) by @987Nabil in https://github.com/zio/zio/pull/8237
ZStream::flatMap
by @guizmaii in https://github.com/zio/zio/pull/8261
Full Changelog: https://github.com/zio/zio/compare/v2.0.15...v2.0.16