This release focuses heavily on performance improvements of zio-streams and zio-test. In particular, users that rely heavily on TestClock in their test suites should experience a noticeable improvement in test execution and flakiness.
[!NOTE]
This release breaks source compatibility of the ZStream#ensuringWith and ZSink#ensuringWith methods by changing the input argument from Exit[E, A] to Exit[Any, Any]. For more info on why this change was necessary please refer to https://github.com/zio/zio/issues/10216.
Most users should not be affected by this change, but if your code fails to compile after updating to zio v2.1.24 due to this change and there is no way to achieve the previous behaviour otherwise, please open an issue with your use-case and we'll look into it promptly.
What's Changed
ZIOAppPlatformSpecific: replace interruptible with uninterruptibleMask by @neko-kai in https://github.com/zio/zio/pull/10261
Optimize Stream, Channel, and Gen creation and performance by @hearnadam in https://github.com/zio/zio/pull/10267
[Bug] BitChunk[Byte|Int|Long].apply(n) treats n as a raw bit index into the underlying array, ignoring minBitIndex by @guizmaii in https://github.com/zio/zio/pull/10257
Change ensuringWith finalizer to Exit by @developerfred in https://github.com/zio/zio/pull/10239
Ensure outgoing queue is shutdown in ZChannel.mapOutZIOPar by @hearnadam in https://github.com/zio/zio/pull/10272
Fix #8924 make Tag and HasNoScope macros blackbox on Scala 3 by @neko-kai in https://github.com/zio/zio/pull/10273
ZScheduler: Support scala.concurrent.blocking by @neko-kai in https://github.com/zio/zio/pull/10274
Runtime.unsafe.run: interrupt forked fiber if the current java Thread was interrupted while waiting for result by @neko-kai in https://github.com/zio/zio/pull/10276
ZStream: Share single reference to (Any, Any) => Unit function by @guizmaii in https://github.com/zio/zio/pull/10287
Optimize ChannelExecutor by @hearnadam in https://github.com/zio/zio/pull/10248
Render StackTrace.none as such by @hearnadam in https://github.com/zio/zio/pull/10305
Clean ZIOSpecAbstract code by @guizmaii in https://github.com/zio/zio/pull/10233
Gen: optimize collection creation by @hearnadam in https://github.com/zio/zio/pull/10307
Avoid fetching FiberId twice when interrupting forkIn Fiber by @hearnadam in https://github.com/zio/zio/pull/10309
ZChannel/ZPipeline: cache identity by @hearnadam in https://github.com/zio/zio/pull/10306
Cache ZStream identity functions by @kyri-petrou in https://github.com/zio/zio/pull/10310
ChannelExecutor: remove dead code & improve maintainability by @hearnadam in https://github.com/zio/zio/pull/10294
Alias catchNonFatalOrDie to catchAll by @hearnadam in https://github.com/zio/zio/pull/10337
Optimize Schedule and Schedule#driver usages and fix laziness tests by @kyri-petrou in https://github.com/zio/zio/pull/10336
ZStream: Ensure that by-name arguments are called only once by @kyri-petrou in https://github.com/zio/zio/pull/10342
Add tests for ZIO laziness by @hearnadam in https://github.com/zio/zio/pull/10344
Clock: use Scheduler.fromScheduledExecutorService on jvm/native by @hearnadam in https://github.com/zio/zio/pull/10345
ZIOApp: align implementation across platforms by @hearnadam in https://github.com/zio/zio/pull/10338
Broad spectrum performance optimizations for zio-test by @kyri-petrou in https://github.com/zio/zio/pull/9404
Add tests for ZStreamAspects by @hearnadam in https://github.com/zio/zio/pull/10335
Add tests for ZStream laziness by @hearnadam in https://github.com/zio/zio/pull/10341
Other changes (CI, dependencies and documentation)
Update izumi-reflect to 3.0.8 by @zio-scala-steward[bot] in https://github.com/zio/zio/pull/10266
Update Scala 2.13 and run CI against JDK25 by @guizmaii in https://github.com/zio/zio/pull/10265
Update reactor-core to 3.8.0 by @zio-scala-steward[bot] in https://github.com/zio/zio/pull/10224
Update zio-metrics-connectors, ... to 2.5.4 by @zio-scala-steward[bot] in https://github.com/zio/zio/pull/10246
Update sbt-mdoc to 2.8.0 by @zio-scala-steward[bot] in https://github.com/zio/zio/pull/10194
Clarity Generator Documentation by @khajavi in https://github.com/zio/zio/pull/10268
Update scala-collection-compat to 2.14.0 by @zio-scala-steward[bot] in https://github.com/zio/zio/pull/10189
Bump actions/setup-java from 5.0.0 to 5.1.0 by @dependabot[bot] in https://github.com/zio/zio/pull/10282
Bump actions/checkout from 6.0.0 to 6.0.1 by @dependabot[bot] in https://github.com/zio/zio/pull/10281
Bump peter-evans/create-pull-request from 7.0.9 to 7.0.11 by @dependabot[bot] in https://github.com/zio/zio/pull/10280
Update maven-resolver-connector-basic, ... to 1.9.25 by @zio-scala-steward[bot] in https://github.com/zio/zio/pull/10286
Update reactor-core to 3.8.1 by @zio-scala-steward[bot] in https://github.com/zio/zio/pull/10285
Bump actions/create-github-app-token from 2.2.0 to 2.2.1 by @dependabot[bot] in https://github.com/zio/zio/pull/10279
Update scala-compiler, scala-library, ... to 2.12.21 by @zio-scala-steward[bot] in https://github.com/zio/zio/pull/10291
Update izumi-reflect to 3.0.9 by @zio-scala-steward[bot] in https://github.com/zio/zio/pull/10288
Update spring-core to 7.0.2 by @zio-scala-steward[bot] in https://github.com/zio/zio/pull/10292
Temporarily stop using JDK25 in CI by @hearnadam in https://github.com/zio/zio/pull/10293
Bump actions/upload-artifact from 5 to 6 by @dependabot[bot] in https://github.com/zio/zio/pull/10299
Bump actions/download-artifact from 6 to 7 by @dependabot[bot] in https://github.com/zio/zio/pull/10298
Bump peter-evans/create-pull-request from 7.0.11 to 8.0.0 by @dependabot[bot] in https://github.com/zio/zio/pull/10297
Bump JamesIves/github-pages-deploy-action from 4.7.4 to 4.7.6 by @dependabot[bot] in https://github.com/zio/zio/pull/10296
Update sbt-scalafix to 0.14.5 by @zio-scala-steward[bot] in https://github.com/zio/zio/pull/10295
Add zio-eclipsestore to ZIO's ecosystem/community libraries docs. by @riccardomerolla in https://github.com/zio/zio/pull/10290
Update sbt-mdoc to 2.8.1 by @zio-scala-steward[bot] in https://github.com/zio/zio/pull/10275
Update maven-compat, maven-embedder to 3.9.12 by @zio-scala-steward[bot] in https://github.com/zio/zio/pull/10301
Fix typos in built-in generators documentation by @felix-hedenstrom in https://github.com/zio/zio/pull/10204
Update dependency @tsconfig/docusaurus to v2.0.7 by @renovate[bot] in https://github.com/zio/zio/pull/10311
Update dependency @zio.dev/zio-cache to v0.2.7 by @renovate[bot] in https://github.com/zio/zio/pull/10312
Update dependency @zio.dev/zio-config to v4.0.6 by @renovate[bot] in https://github.com/zio/zio/pull/10315
Update dependency @zio.dev/zio-cli to v0.7.4 by @renovate[bot] in https://github.com/zio/zio/pull/10314
Update dependency @zio.dev/zio-dynamodb to v1.0.0-RC24 by @renovate[bot] in https://github.com/zio/zio/pull/10317
Update dependency @zio.dev/zio-prelude to v1.0.0-RC44 by @renovate[bot] in https://github.com/zio/zio/pull/10320
Update dependency @zio.dev/zio-logging to v2.5.2 by @renovate[bot] in https://github.com/zio/zio/pull/10318
Update dependency @zio.dev/zio-metrics-connectors to v2.5.4 by @renovate[bot] in https://github.com/zio/zio/pull/10319
Update dependency @zio.dev/zio-sbt to v0.4.9 by @renovate[bot] in https://github.com/zio/zio/pull/10322
Update dependency @zio.dev/zio-redis to v1.1.10 by @renovate[bot] in https://github.com/zio/zio/pull/10321
Update tailwindcss monorepo to v4.1.18 by @renovate[bot] in https://github.com/zio/zio/pull/10326
Update dependency @zio.dev/zio-streams-compress to v1.1.3 by @renovate[bot] in https://github.com/zio/zio/pull/10323
Add Renovate package rule to disable patch updates for non-ZIO npm packages by @Copilot in https://github.com/zio/zio/pull/10313
Update sbt-mdoc to 2.8.2 by @zio-scala-steward[bot] in https://github.com/zio/zio/pull/10333
Update dependency @zio.dev/zio-kafka to v3.2.0 by @renovate[bot] in https://github.com/zio/zio/pull/10328
Update dependency typescript to v5.9.3 by @renovate[bot] in https://github.com/zio/zio/pull/10325
Update dependency prettier to v3.7.4 by @renovate[bot] in https://github.com/zio/zio/pull/10330
Update react monorepo by @renovate[bot] in https://github.com/zio/zio/pull/10332
Update dependency @zio.dev/zio-telemetry to v3.1.12 by @renovate[bot] in https://github.com/zio/zio/pull/10324
Update dependency @zio.dev/zio-json to v0.8.0 by @renovate[bot] in https://github.com/zio/zio/pull/10327
Update dependency prettier-plugin-tailwindcss to v0.7.2 by @renovate[bot] in https://github.com/zio/zio/pull/10331
Fix Renovate Configuration Errors by @khajavi in https://github.com/zio/zio/pull/10339
New Contributors
@developerfred made their first contribution in https://github.com/zio/zio/pull/10239
@riccardomerolla made their first contribution in https://github.com/zio/zio/pull/10290
@Copilot made their first contribution in https://github.com/zio/zio/pull/10313
Full Changelog: https://github.com/zio/zio/compare/v2.1.23...v2.1.24