This version brings a lot of performance improvements in the fiber runtime as well as the scheduler. It is fully binary compatible with the 2.0.x branch with the exception of some internal classes that shouldn't be used anywhere else (we tested a wide range of the library ecosystem without issues).
An important change is that we disabled 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 with the Runtime.enableLoomBasedExecutor
aspect. Which one is better may vary based on your use case so we encourage you to test and measure it.
If you use sttp v3 and Scala 3, you might run into a compile error when trying to provide or access SttpClient
from/to your environment. This is because since #8612 we don't allow materializing tags for intersection types in covariant position and sttp does exactly that: type SttpClient = SttpBackend[Task, ZioStreams with WebSockets]
. Using SttpBackend[Task, Any]
or only one of ZioStreams
/WebSockets
solves the issue.
What's Changed (since 2.1.0-RC5)
- Improve throughput of
ZIO#fork
by 300% by @kyri-petrou in #8814 - Use
add
instead ofunion
when extending a Scope by @kyri-petrou in #8823 - Improve performance of
foreachPar
et.al. by @kyri-petrou in #8816
What's Changed (since 2.0.22)
- 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
FiberRuntime
optimizations by @kyri-petrou in #8671- Implement ZStream.fromTPriorityQueue by @adamgfraser in #8676
- 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
- Revert binary incompatible change on
MutableConcurrentQueue
by @kyri-petrou in #8773 - Allow providing alternative implementations for generating
FiberId
s by @kyri-petrou in #8778 - Maintain backward compatibility of LinkedQueue by @ghostdogpr in #8784
- Improve UX of modifying runtime flags by @kyri-petrou in #8774
- Further optimize ch exec read by @eyalfa in #8775
- Reduce output for huge lists during pretty printing by @andrzejressel in #8692
- Fix awaiting of globally-scoped forked fibers when the app exits by @kyri-petrou in #8796
- Optimizations for FiberRuntime runloop by @kyri-petrou in #8800
- Allow application to exit on normal completion by @kyri-petrou in #8811
Other changes (CI, dependencies and documentation)
- Update Binary Compatibility Version by @adamgfraser in #8601
- Update scalajs documentation to be in line with latest zio2, scalajs by @jypma in #8613
- Fixed some minor typos by @nedmules-sked in #8616
- 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
- chore: removed ZTestFramework by @ezhil56x in #8652
- 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
- Fix build website CI by @ghostdogpr in #8762
- Update Scala, dependencies and sbt plugins by @guizmaii in #8760
- fix(deps): update dependency @zio.dev/zio-telemetry to v3.0.0-rc22 by @renovate in #8776
- Publish with Java 11 rather than 17 by @ghostdogpr in #8780
- Remove outdated comparison with Future from the tagline by @ghostdogpr in #8788
- Update Mima checked version by @guizmaii in #8795
- Give more memory to build website CI job by @ghostdogpr in #8798
- fix(deps): update dependency @zio.dev/zio-profiling to v0.3.1 by @renovate in #8799
- fix(deps): update dependency @zio.dev/zio-config to v4.0.2 by @renovate in #8801
- Update these docs for 2.0 by @AndyKirsch in #8803
- Fixed #8782 - User has incorrect rights by @Yummy-Yums in #8802
- Fix typo in docs: FiberRef reference page by @DanBondarenko in #8809
- Update ZIO HTTP Related Guides by @khajavi in #8806
- Improve GHA execution time by @kyri-petrou in #8810
- Fix typo in docs: Fiber reference page by @DanBondarenko in #8812
- fix(deps): update dependency @zio.dev/zio-telemetry to v3.0.0-rc23 by @renovate in #8815
- Fix flaky "preserves failures" tests by @kyri-petrou in #8817
- fix(deps): update dependency @zio.dev/zio-prelude to v1.0.0-rc25 by @renovate in #8821
- fix(deps): update dependency @zio.dev/zio-quill to v4.8.4 by @renovate in #8824
- fix(deps): update dependency @zio.dev/zio-sbt to v0.4.0-alpha.26 by @renovate in #8825
- Update
sbt
to 1.10.0 by @kyri-petrou in #8826 - Fix publishing snapshot versions by @kyri-petrou in #8830
New Contributors
- @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
- @AndyKirsch made their first contribution in #8803
- @Yummy-Yums made their first contribution in #8802
- @DanBondarenko made their first contribution in #8809
Full Changelog: v2.0.22...v2.1.0