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:
- Regression in ZLayer.make #8767
What's Changed
- Add TestAspects afterFailure and afterSuccess by @hanneshauer in #8588
- Implement TestAspect.afterAll Success and Failure Variants by @adamgfraser in #8590
- Prevent implicit widening to Double by @erikvanoosten in #8594
- Restore Permits by @adamgfraser in #8599
- Race Interruptibly In Channel.mergeAllWith by @adamgfraser in #8600
- Return CompletableFuture Immediately by @adamgfraser in #8605
- Add
asBase64String
toChunk
by @987Nabil in #8606 - add Config methods for NonEmptyChunk by @mberndt123 in #8607
- Implement NonEmptyChunk#groupBy and NonEmptyChunk#groupMap by @adamgfraser in #8608
- [Scala 3] Prevent Tag materialization for intersection types in covariant position by @joroKr21 in #8612
- Implement ZPipeline#dimap by @adamgfraser in #8618
- Implement ZStream#takeWhileZIO by @adamgfraser in #8623
- Too big zio-test output fix by @urbit-pilled in #8614
- ZIO Test: Convert Rendering Failures to Test Failures by @adamgfraser in #8626
- Fix sequence config with shorter one issue by @kyri-petrou in #8624
- Indicate the true position of assertTrue arguments by @joroKr21 in #8642
- Execute Acquire in ScopedRef Uninterruptibly by @adamgfraser in #8638
- Propagate Regional Tags in Aspects Derived from Metrics by @adamgfraser in #8656
- Allow selecting test cases via
TestSelector
by @Duhemm in #8633 - support ZIO.readFile scala.js by @kaplan-shaked in #8632
- Use More Specific Type by @adamgfraser in #8660
FiberRuntime
optimizations by @kyri-petrou in #8671- Implement ZStream.fromTPriorityQueue by @adamgfraser in #8676
- Build fresh layers once with ZLayer macro by @pablf in #8678
- fix: replace dashes in ConfigProvider.envProvider paths by @ThijsBroersen in #8680
- Compile contains in assertTrue tests. by @pablf in #8681
- Allowing comparisons between different types inside assertTrue by @pablf in #8684
- Detect defects in JUnit tests by @pablf in #8688
- Pass deprecated annotation to accessors by @pablf in #8689
- Report the current fiber in
Exception in thread "zio-fiber-X"
instead of the interruptor fiber by @neko-kai in #8687 - Avoid allocation in ZEnvironment.get [series/2.x] by @ghostdogpr in #8713
- Optimize fiber id and executor access [series/2.x] by @ghostdogpr in #8717
- Fix ConfigProvider#nested prefix by @wi101 in #8714
- Added correct fiberRef inheritance if use effect with timeout by @Roman-Statsura in #8721
- Use Chunk.single rather than Chunk.apply [series/2.x] by @ghostdogpr in #8719
- Use the requested strategy in ZStream mergeLeft/mergeRight by @ghostdogpr in #8743
- Remove never used
FiberRuntime.MaxTrampolinesBeforeYield
constant by @guizmaii in #8756 - Optimize
FiberId#isNone
by @guizmaii in #8746 - Optimize
ZIO#absolve
by @kyri-petrou in #8759 - Maintain bin compatibility with
v2.0.x
for methods used inzio/interop-cats
by @kyri-petrou in #8757 - Fix
Runtime#unsafe.fork
andRuntime#unsafe.runToFuture
by @kyri-petrou in #8752 - Optimize fork-join performance by @kyri-petrou in #8745
- ZPipeline.fromFunction benchmark and optimization by @eyalfa in #8761
Documentation Updates
- Update @zio.dev/zio-telemetry docs to 3.0.0-RC20 by @github-actions in #8587
- Update @zio.dev/zio-jdbc docs to 0.1.2 by @github-actions in #8589
- Fix Broken Newsletter's Link by @khajavi in #8593
- Update Copyright by @adamgfraser in #8596
- Update scalajs documentation to be in line with latest zio2, scalajs by @jypma in #8613
- Fixed some minor typos by @nedmules-sked in #8616
- Update @zio.dev/zio-prelude docs to 1.0.0-RC22 by @github-actions in #8627
- Revert "Update @zio.dev/zio-prelude docs to 1.0.0-RC22" by @khajavi in #8637
- ZIO Ecosystem Docusaurus: Automate Project Discovery by @khajavi in #8641
- ZIO Ecosystem Contribution Guide by @khajavi in #8640
- Add Fhir Indexer to The sidebars.js File by @khajavi in #8639
- Add zio nebula graph to sidebar by @jxnu-liguobin in #8622
- zio-logging 2.2.0 website by @justcoon in #8645
- Update @zio.dev/zio-bson docs to 1.0.6 by @github-actions in #8646
- Update installation.md by @DoNotWorr in #8648
- Enable Redirection Plugin for ZIO Website #8647 by @sroopsai in #8651
- fix doc typo by @evis in #8650
- Update creating-sinks.md by @sangwoo-sean in #8658
- Gitter channel -> Discord Server by @hearnadam in #8628
- Update @zio.dev/zio-prelude docs to 1.0.0-RC23 by @github-actions in #8663
- Refine ZIO Ecosystem Contribution Guide by @khajavi in #8643
- Update @zio.dev/zio-sbt docs to 0.4.0-alpha.23 by @github-actions in #8665
- zio-logging 2.2.1 website by @justcoon in #8669
- Update operations.md by @gcsolaroli in #8694
- Update @zio.dev/zio-sbt docs to 0.4.0-alpha.24 by @github-actions in #8685
- Update @zio.dev/zio-query docs to 0.6.1 by @github-actions in #8698
- fix(deps): update dependency @zio.dev/zio-metrics-connectors to v2.3.1 by @renovate in #8727
- fix(deps): update dependency @zio.dev/zio-profiling to v0.3.0 by @renovate in #8728
- fix(deps): update dependency @zio.dev/zio-schema to v1 by @renovate in #8730
- chore(deps): update dependency typescript to v5.4.4 by @renovate in #8725
- fix(deps): update dependency @zio.dev/zio-http to v3.0.0-rc6 by @renovate in #8707
- fix(deps): update dependency @zio.dev/zio-logging to v2.2.2 by @renovate in #8709
- fix(deps): update dependency @zio.dev/zio-telemetry to v3.0.0-rc21 by @renovate in #8722
- fix(deps): update dependency @zio.dev/zio-kafka to v2.7.4 by @renovate in #8708
- fix(deps): update dependency @zio.dev/zio-quill to v4.8.3 by @renovate in #8710
- Update @zio.dev/zio-kafka docs to 2.7.4 by @github-actions in #8691
- fix(deps): update dependency @zio.dev/zio-config to v4.0.1 by @renovate in #8705
- fix(deps): update dependency @zio.dev/zio-ftp to v0.4.2 by @renovate in #8706
- chore(deps): update dependency typescript to v5.4.5 by @renovate in #8733
- Documentation: Clean up Metrics Page by @khajavi in #8736
- chore(deps): update dependency @types/react to v18.2.77 by @renovate in #8737
- fix(deps): update dependency @zio.dev/zio-query to v0.7.0 by @renovate in #8739
- Make Redirect Plugin Compatible with Docusaurus Core by @khajavi in #8738
- chore(deps): update dependency @types/react to v18.2.79 by @renovate in #8750
CI
- Update Binary Compatibility Version by @adamgfraser in #8601
- chore: removed ZTestFramework by @ezhil56x in #8652
- Fix build website CI by @ghostdogpr in #8762
- Fix ScheduleSpec when run on last day of year by @erikvanoosten in #8595
New Contributors
- @hanneshauer made their first contribution in #8588
- @nedmules-sked made their first contribution in #8616
- @urbit-pilled made their first contribution in #8614
- @DoNotWorr made their first contribution in #8648
- @sroopsai made their first contribution in #8651
- @ezhil56x made their first contribution in #8652
- @Duhemm made their first contribution in #8633
- @kaplan-shaked made their first contribution in #8632
- @gcsolaroli made their first contribution in #8694
- @Roman-Statsura made their first contribution in #8721
Full Changelog: v2.1-RC1...v2.1.0-RC2