Releases: zio/zio
2.1.17
Highlights
This release brings a few bug fixes and improvements. One notable fix is that the initial value of Ref
can now be garbage-collected once the value of the Ref
changes (it was not the case previously).
What's Changed
FiberRuntime
micro-optimizations and cleanups by @kyri-petrou in #9653- Optimize
ZIO#provideSomeEnvironment
andFiberRef#locallyWith
by @kyri-petrou in #9652 - Improve non empty collection traits (#9677) by @987Nabil in #9678
- test-sbt: treat TestWildcardSelector correctly by @dubinsky in #9680
- Fix ZIO#timeoutTo inheriting wrong value from FiberRef#locally (#9693) by @vladimirkl in #9700
- Change iterableFactory from val to def in ChunkLike by @kajebiii in #9703
- Improve memory usage in Ref.Atomic by @maximskripnik in #9710
- Allow for the initial value of Ref to be GC'd by @kyri-petrou in #9733
- Add
ZStream.tapChunks
by @erikvanoosten in #9696 - Add
ZStream.mapZIOChunked
by @erikvanoosten in #9697 - Optimize Scope finalization for empty scopes by @kyri-petrou in #9477
- Implement union types
Gen
instance derivation by @guizmaii in #9723 - Make metrics names compatible with Prometheus Java library by @mberndt123 in #9740
Other changes (CI, dependencies and documentation)
- fix(deps): update dependency @zio.dev/zio-json to v0.7.35 by @renovate in #9647
- chore(deps): update dependency cytoscape to v3.31.1 by @renovate in #9648
- Update magnolia to 1.3.16 by @zio-scala-steward in #9649
- fix(deps): update dependency @zio.dev/zio-redis to v1.1.1 by @renovate in #9651
- Update auxlib, clib, javalib, nativelib, ... to 0.5.7 by @zio-scala-steward in #9650
- fix(deps): update dependency @zio.dev/zio-json to v0.7.36 by @renovate in #9655
- fix(deps): update dependency @zio.dev/zio-cache to v0.2.4 by @renovate in #9654
- Revert Scala Native version to 0.5.6 by @kyri-petrou in #9656
- chore(deps): update dependency prettier to v3.5.3 by @renovate in #9661
- chore(deps): update dependency typescript to v5.8.2 by @renovate in #9658
- docs: add a hint about interruption in ScopedRef by @mberndt123 in #9660
- fix(deps): update dependency @zio.dev/zio-json to v0.7.37 by @renovate in #9663
- fix(deps): update dependency @zio.dev/zio-redis to v1.1.2 by @renovate in #9664
- Bump actions/create-github-app-token from 1.11.5 to 1.11.6 by @dependabot in #9666
- fix(deps): update dependency react-markdown to v10.0.1 by @renovate in #9665
- Update sbt, sbt-dependency-tree, ... to 1.10.9 by @zio-scala-steward in #9667
- fix(deps): update dependency @zio.dev/zio-json to v0.7.38 by @renovate in #9669
- fix(deps): update dependency @zio.dev/zio-schema to v1.6.4 by @renovate in #9670
- Update sbt, sbt-dependency-tree, ... to 1.10.10 by @zio-scala-steward in #9671
- fix(deps): update dependency @zio.dev/zio-telemetry to v3.1.2 by @renovate in #9673
- fix(deps): update dependency @zio.dev/zio-json to v0.7.39 by @renovate in #9672
- fix(deps): update dependency react-markdown to v10.1.0 by @renovate in #9674
- fix(deps): update dependency @zio.dev/zio-streams-compress to v1.1.0 by @renovate in #9675
- fix(deps): update dependency autoprefixer to v10.4.21 by @renovate in #9679
- Bump peter-evans/create-pull-request from 7.0.7 to 7.0.8 by @dependabot in #9682
- fix(deps): update dependency @zio.dev/zio-http to v3.1.0 by @renovate in #9685
- Update sbt-ci-release to 1.9.3 by @zio-scala-steward in #9691
- Update reactor-core to 3.7.4 by @zio-scala-steward in #9687
- fix(deps): update dependency @zio.dev/zio-schema to v1.6.5 by @renovate in #9689
- Update spring-core to 6.2.4 by @zio-scala-steward in #9694
- Add ZSteam un-chunking notes by @erikvanoosten in #9695
- Update zio-http to 3.1.0 by @zio-scala-steward in #9686
- fix(deps): update dependency @zio.dev/zio-config to v4.0.4 by @renovate in #9699
- Update junit-platform-engine to 1.12.1 by @zio-scala-steward in #9698
- fix(deps): update dependency @zio.dev/zio-schema to v1.6.6 by @renovate in #9702
- chore(deps): update dependency @types/react to v19.0.11 by @renovate in #9706
- Update sbt, sbt-dependency-tree, ... to 1.10.11 by @zio-scala-steward in #9707
- Update sbt-mdoc to 2.6.5 by @zio-scala-steward in #9708
- chore(deps): update dependency @types/react to v19.0.12 by @renovate in #9712
- fix(deps): update dependency @zio.dev/zio-redis to v1.1.3 by @renovate in #9713
- Update sbt-bloop to 2.0.9 by @zio-scala-steward in #9714
- Update spring-core to 6.2.5 by @zio-scala-steward in #9715
- fix(deps): update dependency @zio.dev/zio-query to v0.7.7 by @renovate in #9718
- fix(deps): update dependency @zio.dev/zio-kafka to v2.12.0 by @renovate in #9721
- Update cats-effect to 3.6.0 by @zio-scala-steward in #9722
- Bump actions/create-github-app-token from 1.11.6 to 1.11.7 by @dependabot in #9725
- Update fs2-core to 3.12.0 by @zio-scala-steward in #9727
- fix(deps): update dependency @zio.dev/zio-http to v3.2.0 by @renovate in #9730
- Upgrade to Tailwind 4 by @johnspade in #9728
- fix(deps): update tailwindcss monorepo to v4.0.17 by @renovate in #9731
- Update zio-http to 3.2.0 by @zio-scala-steward in #9732
- Use simple CSS minifier by @johnspade in #9734
- fix(deps): update react monorepo to v19.1.0 by @renovate in #9735
- fix(deps): update dependency @zio.dev/zio-telemetry to v3.1.3 by @renovate in #9736
- Bump actions/create-github-app-token from 1.11.7 to 1.12.0 by @dependabot in #9737
- chore(deps): update dependency cytoscape to v3.31.2 by @renovate in #9739
- fix(deps): update tailwindcss monorepo to v4.1.0 by @renovate in #9741
- fix(deps): update tailwindcss monorepo to v4.1.1 by @renovate in #9746
- chore(deps): update dependency @types/react to v19.1.0 by @renovate in #9745
- Disable Renovate Dependency Dashboard by @hearnadam in #9747
- fix(deps): update tailwindcss monorepo to v4.1.2 by @renovate in #9749
- fix(deps): update tailwindcss monorepo to v4.1.3 by @renovate in #9752
New Contributors
- @kajebiii made their first contribution in #9703
- @maximskripnik made their first contribution in #9710
Full Changelog: v2.1.16...v2.1.17
2.1.16
Highlights
This seemingly small release brings 2 new features to ZIO which library authors can utilize in order to provide a better DX for users. As usually, it also contains a number of optimizations, bug fixes, and it's fully binary and source-compatible with the rest of the v2.x series.
HasNoScope
evidence (#9604)
In ZIO, having a Scope
as an environment requirement indicates that the effect contains finalizers (e.g., closing an HTTP connection) which need to be handled at some point in the evaluation of the effect or the application's lifetime. In certain cases, we might want to ensure that an effect provided to a method does not contain any finalizers. Starting with this version of ZIO, users / library authors can use the HasNoScope
evidence for methods where the environment is generic, e.g.,:
def foo[R, A](f: ZIO[R, Nothing, A)(using HasNoScope[R]) = ???
val f1 = foo(ZIO.succeed("foo")) // compiles
val f2 = foo(ZIO.acquireRelease(ZIO.succeed("foo"))(_ => ZIO.unit)) // fails to compile
Note that this feature is primarily intended for use in libraries such as zio-http
where we need to ensure that a user-provided effect does not contain any finalizers.
Generic interfaces for non-empty collections (#9560)
This release introduces the NonEmptySeq
type class (which NonEmptyChunk
now extends) so that users / library authors can write generic code which requires non-empty collections as arguments.
What's Changed
- Mark
broacastDynamic
tests as flaky by @kyri-petrou in #9558 - Mark
Fiber
as sealed by @hearnadam in #9554 - Optimise
zio.stream.ZChannel#mapOutZIOPar
code by @guizmaii in #9556 - #9467 add peekAll to TQueue by @IgorDorokhov in #9476
- more general type for ZSink.last by @mberndt123 in #9506
- Add internal
Promise#succeedUnit
method to avoidExit
allocation when possible by @guizmaii in #9571 - Improve warning to
Chunk.fromArray
about array mutability by @kyri-petrou in #9576 - fix to SuiteAll macro, fail on missing type Spec if not imported by @kaplan-shaked in #9575
- Use an
inline given
for CanFail evidence in Scala 3 by @kyri-petrou in #9568 - add
stringValue
method tozio.Config.Secret
by @mberndt123 in #9580 - Implement generic interfaces for non-empty collections (#9559) by @987Nabil in #9560
- Optimise
ZIO::exit
encoding by @guizmaii in #9586 - Optimize
ZIO::flatMapError
encoding by @guizmaii in #9585 - Reduce cost of
Promise
creation by @guizmaii in #9603 - Clean
zio.stream.ZStream#toPull
code by @guizmaii in #9400 - Add
HasNoScope
type class (#9597) by @987Nabil in #9604
Other changes (CI, dependencies and documentation)
- fix(deps): update dependency @zio.dev/zio-json to v0.7.15 by @renovate in #9551
- Update magnolia to 1.3.11 by @zio-scala-steward in #9553
- fix(deps): update dependency @zio.dev/zio-json to v0.7.16 by @renovate in #9561
- Remove community project
zio-aws-s3
from doc as it's not maintained by @guizmaii in #9564 - Update zio-aws doc by @guizmaii in #9563
- Update magnolia to 1.3.12 by @zio-scala-steward in #9567
- chore(deps): update dependency prettier to v3.5.0 by @renovate in #9566
- Deprecate accessor methods in zio-kafka tutorial by @erikvanoosten in #9565
- fix(deps): update dependency @zio.dev/zio-json to v0.7.17 by @renovate in #9572
- fix(deps): update dependency @zio.dev/zio-prelude to v1.0.0-rc39 - autoclosed by @renovate in #9573
- fix: Flaky broadcastDynamic tests (#9555) by @gkfabs in #9557
- Bump actions/create-github-app-token from 1.11.2 to 1.11.3 by @dependabot in #9577
- fix(deps): update dependency postcss to v8.5.2 by @renovate in #9578
- fix(deps): update dependency @zio.dev/zio-bson to v1.0.8 by @renovate in #9579
- Update reactor-core to 3.7.3 by @zio-scala-steward in #9581
- fix(deps): update dependency @zio.dev/zio-json to v0.7.18 by @renovate in #9582
- fix(deps): update dependency @zio.dev/zio-redis to v1.0.1 by @renovate in #9583
- fix(deps): update dependency @zio.dev/zio-sbt to v0.4.0-alpha.31 by @renovate in #9584
- fix(deps): update dependency @zio.dev/zio-json to v0.7.19 by @renovate in #9588
- fix(deps): update dependency @zio.dev/zio-json to v0.7.20 by @renovate in #9591
- chore(deps): update dependency prettier to v3.5.1 by @renovate in #9590
- Update magnolia to 1.3.13 by @zio-scala-steward in #9594
- fix(deps): update dependency @zio.dev/zio-json to v0.7.21 by @renovate in #9599
- Update sbt-mdoc to 2.6.4 by @zio-scala-steward in #9595
- Update spring-core to 6.2.3 by @zio-scala-steward in #9596
- chore(deps): update dependency @types/react to v19.0.9 by @renovate in #9605
- Bump actions/create-github-app-token from 1.11.3 to 1.11.5 by @dependabot in #9607
- chore(deps): update dependency @types/react to v19.0.10 by @renovate in #9606
- Update magnolia to 1.3.14 by @zio-scala-steward in #9609
- fix(deps): update dependency @zio.dev/zio-json to v0.7.22 by @renovate in #9612
- fix(deps): update dependency @zio.dev/zio-json to v0.7.23 by @renovate in #9613
- fix(deps): update dependency react-icons to v5.5.0 by @renovate in #9615
- fix(deps): update dependency @zio.dev/zio-json to v0.7.24 by @renovate in #9614
- fix(deps): update dependency @zio.dev/zio-json to v0.7.25 by @renovate in #9618
- Tweaking the zio-kafka tutorial by @erikvanoosten in #9617
- fix(deps): update dependency postcss to v8.5.3 by @renovate in #9620
- fix(deps): update dependency @zio.dev/zio-schema to v1.6.2 by @renovate in #9619
- fix(deps): update dependency @zio.dev/zio-kafka to v2.11.0 by @renovate in #9621
- fix(deps): update dependency @zio.dev/zio-json to v0.7.26 by @renovate in #9627
- fix(deps): update dependency @zio.dev/zio-schema to v1.6.3 by @renovate in #9623
- fix(deps): update dependency react-markdown to v10 by @renovate in #9626
- chore(deps): update dependency prettier to v3.5.2 by @renovate in #9631
- fix(deps): update dependency @zio.dev/zio-json to v0.7.28 by @renovate in #9632
- Update sbt-scalafix, scalafix-testkit to 0.14.2 by @zio-scala-steward in #9628
- Update junit-platform-engine to 1.12.0 by @zio-scala-steward in #9630
- fix(deps): update dependency @zio.dev/zio-redis to v1.1.0 by @renovate in #9634
- fix(deps): update dependency @zio.dev/zio-json to v0.7.29 by @renovate in #9635
- fix(deps): update dependency @zio.dev/zio-logging to v2.5.0 by @renovate in #9636
- fix(deps): update dependency @zio.dev/zio-json to v0.7.30 by @renovate in #9637
- fix(deps): update dependency @zio.dev/zio-json to v0.7.31 by @renovate in #9641
- Bump JamesIves/github-pages-deploy-action from 4.7.2 to 4.7.3 by @dependabot in #9639
- fix(deps): update dependency @zio.dev/zio-json to v0.7.32 by @renovate in #9643
- Bump peter-evans/create-pull-request from 7.0.6 to 7.0.7 by @dependabot in #9640
- fix(deps): update dependency @zio.dev/zio-json to v0.7.33 by @renovate in #9644
- Update slf4j-simple to 2.0.17 by @zio-scala-steward in #9646
- Update magnolia to 1.3.15 by @zio-scala-steward in #9645
Full Changelog: v2.1.15...v2.1.16
2.1.15
Highlights
This release contains various under-the-hood optimizations and minor bug fixes.
Important
One noteable change is the update of izumi-reflect
to v3.x from v2.x. This version of izumi-reflect
generates tags that are not binary/backwards compatible for Scala 3 opaque types with those generated by v2.x.
Since zio
itself does not use opaque types, we considered this as a safe change. However, library authors that have ZIO as a dependency might want to check whether this change affects them in any way and release a new version using the updated zio
/ izumi-reflect
versions
What's Changed
- More efficient cleaning of exception stack traces in zio-test by @plokhotnyuk in #9437
- Optimise
zio.stream.ZStream.repeat
by @guizmaii in #9397 - Optimise
zio.stream.ZStream#takeRight
by @guizmaii in #9398 - Sink drop while bug by @eyalfa in #9405
- Optimise
zio.stream.ZChannel.mergeAllWith
code by @guizmaii in #9383 - Optimize
FiberRef#locally
by @guizmaii in #9480 - Optimize
FiberRef#locallyScoped
by @guizmaii in #9481 - Optimize
FiberRef#locallyScopedWith
by @guizmaii in #9483 - Fix rare race condition causing
ZStream
to hang on parallel errors by @kyri-petrou in #9478 - Optimize
ZIO.fail
by @kyri-petrou in #9487 - Optimize logging by @kyri-petrou in #9489
- Print interruptions in
ZIO#debug
by @kyri-petrou in #9473 - Make
*VersionSpecific
and*PlatformSpecific
traits package-private by @kyri-petrou in #9491 - update: ZIO#head to use subtype of Seq, not List by @hearnadam in #9502
- Cache+seal evidence classes by @hearnadam in #9509
- Optimize Ref.Atomic by @hearnadam in #9500
- fix : ZStream Broadcastdynamic hanging by @gkfabs in #9474
- Ensure
Supervisor#onEnd
is called exactly once by @kyri-petrou in #9537 ZIO.fromEither
should produce a stacktrace on failure by @kyri-petrou in #9536
Other changes (CI, dependencies and documentation)
- Update contributor guidelines by @plokhotnyuk in #9435
- Update dependency highlight.js to v11.11.1 by @renovate in #9440
- Update dependency @zio.dev/zio-sbt to v0.4.0-alpha.29 by @renovate in #9442
- Docs (test-aspects) - use sbt testOnly in examples by @dbrown428 in #9441
- Update dependency @zio.dev/zio-config to v4.0.3 by @renovate in #9444
- Update @zio.dev/zio-dynamodb docs to 1.0.0-RC17 by @github-actions in #9446
- Use GitHub App Token to Create PRs of New Documentation Releases by @khajavi in #9447
- Update dependency @zio.dev/zio-streams-compress to v1 by @renovate in #9448
- Update dependency @zio.dev/zio-sbt to v0.4.0-alpha.30 by @renovate in #9451
- Update dependency @zio.dev/zio-telemetry to v3.1.1 by @renovate in #9454
- Update scalafmt version by @kyri-petrou in #9450
- Update dependency @zio.dev/zio-json to v0.7.4 by @renovate in #9455
- Add documentation about using virtual threads by @digy in #9368
- Update dependency typescript to v5.7.3 by @renovate in #9457
- Update dependency @types/react to v19.0.4 by @renovate in #9456
- Update dependency @zio.dev/zio-kafka to v2.9.1 by @renovate in #9460
- Update dependency @types/react to v19.0.5 by @renovate in #9461
- Update dependency @types/react to v19.0.6 by @renovate in #9462
- Add test for
ZStream#dropWhileZIO
by @kyri-petrou in #9463 - Update dependency @types/react to v19.0.7 by @renovate in #9468
- Update dependency cytoscape to v3.31.0 by @renovate in #9465
- Update dependency prettier-plugin-tailwindcss to v0.6.10 by @renovate in #9469
- Update dependency postcss to v8.5.1 by @renovate in #9466
- Reduce parallelism of
ZStreamSpec
by @kyri-petrou in #9464 - Run Auto-approve GH job only for renovate PRs by @kyri-petrou in #9472
- Update dependency @zio.dev/zio-kafka to v2.10.0 by @renovate in #9475
- Add missing
disableAutoTrace
in ZStream file by @kyri-petrou in #9479 - Fix flaky test in SemaphoreSpec by @kyri-petrou in #9492
- Update dependency @zio.dev/zio-schema to v1.6.0 by @renovate in #9497
- Update dependency prettier-plugin-tailwindcss to v0.6.11 by @renovate in #9496
- Update dependency @zio.dev/zio-json to v0.7.5 by @renovate in #9495
- Update dependency @types/react to v19.0.8 by @renovate in #9493
- Update dependency @zio.dev/zio-schema to v1.6.1 by @renovate in #9499
- Update dependency @zio.dev/zio-json to v0.7.6 by @renovate in #9498
- Update dependency @zio.dev/zio-json to v0.7.7 by @renovate in #9501
- Update dependency @zio.dev/zio-json to v0.7.8 by @renovate in #9504
- Update dependency @zio.dev/izumi-reflect to v2024.11.11-da5b828d4d6e by @renovate in #9513
- Update dependency @zio.dev/zio-json to v0.7.9 by @renovate in #9510
- Disable bsp for js/native specific sources by @hearnadam in #9508
- fix(deps): update dependency react-markdown to v9.0.3 by @renovate in #9515
- Update izumi-reflect to v3.0.0 by @kyri-petrou in #9517
- Update dependencies by @guizmaii in #9520
- fix(deps): update dependency @zio.dev/zio-json to v0.7.10 by @renovate in #9522
- Deprecating accessor methods by @erikvanoosten in #9519
- fix broken links in docs by @mberndt123 in #9514
- fix(deps): update dependency @zio.dev/zio-json to v0.7.12 by @renovate in #9528
- Fix CI: Update
actions/upload-artifact
&&actions/download-artifact
by @guizmaii in #9527 - fix(deps): update dependency @zio.dev/zio-json to v0.7.12 by @renovate in #9529
- fix(deps): update dependency @zio.dev/zio-json to v0.7.13 by @renovate in #9530
- Add scala-steward and dependabot to maintain things up-to-date by @guizmaii in #9526
- Bump actions/checkout from 4.1.1 to 4.2.2 by @dependabot in #9534
- Bump release-drafter/release-drafter from 5 to 6 by @dependabot in #9532
- Bump actions/create-github-app-token from 1.11.1 to 1.11.2 by @dependabot in #9535
- Bump actions/setup-java from 4.2.1 to 4.7.0 by @dependabot in #9533
- Bump JamesIves/github-pages-deploy-action from 4.4.1 to 4.7.2 by @dependabot in #9531
- Update sbt-mdoc to 2.6.3 by @zio-scala-steward in #9543
- Update junit-platform-engine to 1.11.4 by @zio-scala-steward in #9542
- Update izumi-reflect to 3.0.1 by @zio-scala-steward in #9539
- fix(deps): update dependency @zio.dev/zio-json to v0.7.14 by @renovate in #9546
- Bump actions/setup-node from 3 to 4 by @dependabot in #9545
- Documentation: Remove Deprecated Projects by @khajavi in #9547
- Update magnolia to 1.3.10 by @zio-scala-steward in #9549
New Contributors
- @dbrown428 made their first contribution in #9441
- @zio-scala-steward made their first contribution in #9543
- @gkfabs made their first contribution in #9474
Full Changelog: v2.1.14...v2.1.15
2.1.14
Highlights
This release comes packed with bug fixes and under-the-hood optimizations. Big thank you to all the old and new contributors for their work in this release!
Important
Runtime behaviour change of ZIO#onDone
and ZIO#onDoneCause
In this release, the behavior of onDone
and onDoneCause
has changed to address concerns raised in #9191. Unlike other onX
methods, onDone
and onDoneCause
executed the callback effects in "fire and forget" mode.
We believe that this behaviour could lead to unexpected bugs in applications. As such we changed the implementation of these methods so that the callbacks are executed synchronously. While we believe it's highly unlikely that users using these methods were aware of this implementation detail, we still advice them to review their usages as a precaution.
What's Changed
- More efficient parsing of line numbers without string allocations (#9433) @plokhotnyuk
- More
Exit
optimizations forZIO
methods (#9427) @kyri-petrou - Check
Exit.Success
first inFiberRuntime#runloop
(#9422) @kyri-petrou - Optimizations for
ZIO#foreach*
methods (#9365) @kyri-petrou - Use an
Exit
forPromise.succeed
(#9419) @kyri-petrou - Use
Exit.succeed
in more places (#9418) @kyri-petrou - Optimisation: Replace
Trace.instance.unapply
calls withTrace.instance.parse
(#9416) @guizmaii - Optimise
Tracer.instance#unapply
(#9414) @guizmaii - Optimize pattern-matching in
ZIO
/Exit
methods (#9415) @kyri-petrou - Ensure that TestClock methods are thread-safe (#9408) @kyri-petrou
- Optimisation: Implement
ZIO.suspendSucceed
withZIO.FlatMap
(#9388) @guizmaii - Optimisation - FiberRuntime: bypass evaluation of
flatmap.first
when possible (#9393) @guizmaii - Optimise
zio.stream.ZStream.fromChunk
(#9396) @guizmaii - Optimise
zio.stream.ZStream.succeed
(#9399) @guizmaii - Optimise
FiberRef#set
(#9402) @guizmaii - Optimisation - FiberRuntime: Remove
ZIO.Continuation
allocation (#9391) @guizmaii - Optimize Scope-related methods (#9372) @kyri-petrou
- zio-test: Don't overwrite inner node labels (#9363) @joroKr21
- Fix race condition for errors in
ZChannel.mapOutZIOPar*
methods (#9354) @kyri-petrou - Refactor
FiberRefs
shortcut optimizations (#9328) @kyri-petrou - Optimise
ZStream.repeatZIOChunkOption
(#9379) @guizmaii - Fix #9358 OS signal handling for windows (#9366) @clarzte
- [Issue #8571] Fix spans in TestResults with inlined code (#9367) @arainko
- Remove internal usages of
ZIO.done
(#9369) @kyri-petrou - Ensure ZLayer macros use the trace from implicit scope (#9361) @joroKr21
- Simplify
Pull.failCause
code (#9364) @guizmaii - Add Runtime method to enable loom based blocking executor (#9355) @digy
- Replace internal
ZIO.success(Chunk.empty)
calls withExit.emptyChunk
(#9360) @guizmaii - Replace all internal
ZIO.fail(None)
withExit.failNone
(#9359) @guizmaii - Fix leak of finalizers in
ZKeyedPool
(#9329) @kyri-petrou - Transfer child finalisers to parent in ZIO.raceAll and ZIO.raceFibersWith #9203 (#9353) @digy
- Fix zio-kafka regression caused by ZStream changes (#9341) @kyri-petrou
- Bring Ref on par with AtomicInteger (#9340) @erikvanoosten
- Make
val
s non-transient in ZIO services (#9345) @kyri-petrou - Cause filter fix (#9254) @eyalfa
- Use
-Ybackend-parallelism:4
when compiling Scala 2.13 with optimization enabled (#9346) @kyri-petrou - [Issue-9272] add ZLayer#runWith (#9351) @arainko
- Add
applyOnExit
andapplyOnExitWith
methods toZIO.Grafter
(#9349) @kyri-petrou - Use a
val
for accessingRef.Atomic#unsafe
(#9344) @kyri-petrou - perf: Use whileLoop instead of recursion for several functions (#9131) @tmccombs
- Suppress ExplicitImplicitTypes Wartremover warning in macro (#9323) @joroKr21
- Fix Scope propagation in
ZStream#runScoped
(#9327) @kyri-petrou - Fix scope propagation for multiple specs #9175 (#9325) @clarzte
- Remove implicit forking in ZIO#onDone and ZIO#onDoneCause to align with onX methods (#9286) @asr2003
- Cleanup & update build.sbt (#9310) @kyri-petrou
Other changes (CI, dependencies and documentation)
- Update dependency @types/react to v19.0.2 (#9434) @renovate
- Update dependency tailwindcss to v3.4.17 (#9432) @renovate
- Migrate renovate config (#9428) @renovate
- Update izumi Version (#9429) @khajavi
- Update dependency typescript to v5.7.2 (#9425) @renovate
- Update dependency @tsconfig/docusaurus to v2.0.3 (#9420) @renovate
- Update dependency @types/react-helmet to v6.1.11 (#9421) @renovate
- Update dependency tailwindcss to v3.4.16 (#9423) @renovate
- Update dependency clsx to v2.1.1 (#9424) @renovate
- fix(deps): update dependency highlight.js to v11.11.0 (#9413) @renovate
- chore(deps): update react monorepo to v19 (major) - autoclosed (#9381) @renovate
- chore(deps): update dependency prettier to v3.4.2 - autoclosed (#9374) @renovate
- chore(deps): update dependency @types/react to v18.3.13 (#9376) @renovate
- fix(deps): update dependency @zio.dev/zio-cli to v0.7.0 (#9377) @renovate
- fix(deps): update dependency react-icons to v5.4.0 (#9371) @renovate
- feat: Migrate to Docusaurus v3 (#9165) @neo773
- Update documentation of ref to fix warning about immutable data (#9357) @varshith257
- Avoid name clash on JDK 23 from java.io.IO (#9322) @digy
- Remove Scalac From Sponsors (#9331) @khajavi
- chore(deps): update dependency prettier to v3.4.1 (#9347) @renovate
- fix(deps): update dependency @zio.dev/zio-telemetry to v3.1.0 (#9348) @renovate
- Add a Banner for Zionomicon Announcement (#9338) @khajavi
- chore(deps): update dependency prettier to v3.4.0 (#9343) @renovate
- chore(deps): update dependency cytoscape to v3.30.4 (#9342) @renovate
- fix(deps): update dependency @zio.dev/zio-telemetry to v3.0.2 (#9335) @renovate
- fix(deps): update dependency @zio.dev/zio-quill to v4.8.5 (#9334) @renovate
- Introducing ZIO Guru on Gurubase.io (#9314) @kursataktas
- chore(deps): update dependency prettier-plugin-tailwindcss to v0.6.9 (#9315) @renovate
- fix(deps): update dependency @zio.dev/zio-prelude to v1.0.0-rc35 (#9318) @renovate-bot
New Contributors
- @clarzte made their first contribution in #9325
- @kursataktas made their first contribution in #9314
- @tmccombs made their first contribution in #9131
- @arainko made their first contribution in #9351
- @digy made their first contribution in #9322
- @neo773 made their first contribution in #9165
- @plokhotnyuk made their first contribution in #9433
Full Changelog: v2.1.13...v2.1.14
2.1.13
Highlights
This seemingly small release brings a number of new features and important bugfixes:
- Adds support for the Junit 5 engine via the new
zio-test-junit-engine
module #9214. - [ScalaJS] Adds support for accessing environment variables via
zio.System
in JS engines that support it (e.g., NodeJS) #9282. - Fixes a bug to an issue some users faced with
ZStream.mapZIOPar*
methods since v2.1.12 #9312.
As always, this version is fully source and binary compatible with the rest of the v2.x series.
What's Changed
- Add junit 5 engine for zio tests. Resolves #6724 by @vincent-raman in #9214
- Fix Span Substring Bounds Handling by @Saturn225 in #9285
- Make environment variables access platform-specific by @mhriemers in #9282
- Allow creation of child fibers within uninterruptible regions on interrupted fibers by @kyri-petrou in #9295
- Ensure that FiberRuntime auto-yields when evaluating
WhileLoop
s by @kyri-petrou in #9289 - Improve subtype global cache performance by @kyri-petrou in #9296
- Fix memory leak in
ZKeydPool#invalidate
by @kyri-petrou in #9307 - Reduce the size of code generated by layer macros by @joroKr21 in #9281
- Fix interruption propagation in
ZChannel#mapOutPar*
methods by @kyri-petrou in #9312
Other changes (CI, dependencies and documentation)
- Doc: Simplify example by @guizmaii in #9287
- fix(deps): update dependency @zio.dev/zio-prelude to v1.0.0-rc32 by @renovate in #9290
- fix(deps): update dependency postcss to v8.4.48 by @renovate in #9292
- fix(deps): update dependency postcss to v8.4.49 by @renovate in #9294
- fix(deps): update dependency @zio.dev/zio-prelude to v1.0.0-rc33 by @renovate in #9293
- Fix flaky interruption test by @kyri-petrou in #9299
- fix(deps): update dependency @zio.dev/zio-logging to v2.4.0 - autoclosed by @renovate in #9298
- fix(deps): update dependency @zio.dev/zio-kafka to v2.9.0 by @renovate in #9301
- fix(deps): update dependency @zio.dev/zio-prelude to v1.0.0-rc34 by @renovate in #9302
- fix(deps): update dependency tailwindcss to v3.4.15 by @renovate in #9305
- Fix timeouts in ZStream test by @kyri-petrou in #9313
- Fix release CI (#9317) @kyri-petrou
New Contributors
- @Saturn225 made their first contribution in #9285
- @mhriemers made their first contribution in #9282
Full Changelog: v2.1.12...v2.1.13
2.1.12
This release brings a couple bug fixes for STM
, as well as a few optimizations and usability improvements.
What's Changed
- Add addLogAnnotation method to Runtime for adding a log annotation to the entire app by @somdoron in #9235
- Add
ZIO.fromNullable
by @kyri-petrou in #9250 - Use reflection to install system signal handlers in JVM applications by @kyri-petrou in #9251
- adds ConfigProvider.fromAppArgs by @somdoron in #9242
- fix pipeline intersperse issue by @paulpdaniels in #9253
- [9102] - add awaiting function to Semaphore by @IgorDorokhov in #9212
- Expose
Fiber.Runtime.UnsafeAPI#interrupt
method by @hearnadam in #9246 - Ensure that transactions containing both reads and writes are consistent by @kyri-petrou in #9265
- optimize fromCompletionStage by @hearnadam in #9267
- Optimise happy path in ZChannel.mapOutZIOPar* by @regiskuckaertz in #9123
- Allow all types of statements within
suiteAll
for Scala 3 by @kyri-petrou in #9273 - Make
TMap#toMap
idempotent by @kyri-petrou in #9280
Other changes (CI, dependencies and documentation)
- fix(deps): update dependency @zio.dev/zio-profiling to v0.3.2 by @renovate in #9238
- Add
.devcontainer
config by @kyri-petrou in #9228 - fix(deps): update dependency @zio.dev/zio-ftp to v0.4.3 by @renovate in #9241
- fix(deps): update dependency @zio.dev/zio-logging to v2.3.2 by @renovate in #9248
- fix(deps): update dependency @zio.dev/zio-telemetry to v3.0.0 by @renovate in #9249
- Add zio-streams-compress by @erikvanoosten in #9252
- Added zio-cli sample project to sampleprojects by @fancellu in #9256
- Add Kafka BigQuery Express to the sampleprojects by @erikvanoosten in #9255
- fix(deps): update dependency @zio.dev/zio-streams-compress to v0.0.2 by @renovate in #9259
- fix(deps): update dependency @zio.dev/zio-kafka to v2.8.3 by @renovate in #9263
- docs: update quickstarts and tutorials for sbt-revolver plugin added by @varshith257 in #9195
- Update dependencies by @kyri-petrou in #9270
- Fixed typo in zio.md by @gbarrett-makeit in #9275
- Add articles to Resources and sort them by @ghostdogpr in #9277
- Fix Scaladoc for
ZStream.fromOutputStreamScoped
by @kyri-petrou in #9269 - Doc: Update the Service Pattern doc && Remove the
Accessor Methods
section from it by @guizmaii in #9220 - fix(deps): update dependency @zio.dev/zio-telemetry to v3.0.1 by @renovate in #9278
2.1.11
We found a regression in 2.1.10 causing a runtime exception in some cases when using ZIO environment and layers, so here's a release to fix that.
What's Changed
- Fix
IndexOutOfBoundsException
when usingreverseIterator
onUpdateOrderLinkedMap
by @kyri-petrou in #9239
2.1.10
This release brings a few important bug fixes related to ZPool
and ZSTM
as well as some optimizations. It also fixes a binary incompatibility that caused runtime errors when using an older version ZIO Streams together with ZIO 2.1.9.
Important note about ZPool changes
There are 2 fixes / changes to ZPool that might affect the behaviour of an application so users are advised to revise the following in cases of unexpected behaviour after upgrading to ZIO 2.1.10+.
Eager / strict initialization of ZPool's resources
In previous ZIO versions, the initialization of ZPool resources was done lazily in a daemon fiber. e.g., this code would previously print the message, but will now "hang" awaiting for the pool to be initialized to its full size:
ZPool.make(ZIO.never, 10) *> ZIO.debug("Pool initialized")
We believe that this change makes the behaviour of ZPool more predictable (and referentially transparent!) as previously there were no guarantees that the ZPool resources would be initialized during the creation of the pool. However, this might result in the initialization of the pool hanging in cases that the acquisition of the resources itself hangs. Therefore users are advised to consider adding timeouts to the resource initialization effect.
Strict finalization of ZPool resources
In previous versions, it was possible for the ZPool finalizers to be interrupted, which would lead to potential leak of resources (see this issue for more info). Starting with ZIO 2.1.10+, closing a ZPool requires all of the resource finalizers to finish first. As with (1), this might lead to some unexpected behaviour if the finalization of a resource hangs indefinitely, so users are advised to add timeouts to the finalizers of resources used with ZPool.
What's Changed
- Use "unsafe" methods in
Ref.Atomic
by @kyri-petrou in #9155 - Fix ZPool finalizers not running when resource acquisition fails or is interrupted by @kyri-petrou in #9163
- Initialize ZPool to its full size in the calling fiber by @kyri-petrou in #9164
- Install signal handlers when running test suites by @kyri-petrou in #9166
- Ensure ZPool finalizers are run if initialization is interrupted by @kyri-petrou in #9174
- Ensure all FiberId recursive methods are stack safe by @guymers in #9173
- Inherit child fibers created by merged streams by @kyri-petrou in #9180
- Fix assert macro throwing missing method error in Scala 3 by @kyri-petrou in #9183
- Add mapErrorZIO to streams by @cipriansofronia in #9187
- Use reference equality in
ZEnvironment
when applying optimizations by @kyri-petrou in #9207 - Fix binary incompatibility issue in zio v2.1.7+ by @kyri-petrou in #9223
- Attempt to obtain new locks without retrying transaction in ZSTM by @kyri-petrou in #9221
Other changes (CI, dependencies and documentation)
- chore(deps): update dependency @types/react to v18.3.5 by @renovate in #9154
- fix(deps): update dependency postcss to v8.4.42 by @renovate in #9156
- Restyling welcome page by @SvMak in #9112
- fix(deps): update dependency postcss to v8.4.43 by @renovate in #9158
- fix(deps): update dependency postcss to v8.4.44 by @renovate in #9159
- Add zio-apache-parquet to ecosystem community docs by @grouzen in #9157
- fix(deps): update dependency postcss to v8.4.45 by @renovate in #9169
- fix(deps): update dependency @zio.dev/zio-prelude to v1.0.0-rc31 by @renovate in #9171
- Set JDK release version to 11 by @kyri-petrou in #9177
- fix(deps): update dependency @zio.dev/zio-http to v3.0.0 by @renovate in #9190
- Fix logo resolution by @SvMak in #9188
- fix(deps): update dependency postcss to v8.4.47 by @renovate in #9196
- fix(deps): update dependency tailwindcss to v3.4.11 by @renovate in #9192
- fix(deps): update dependency @zio.dev/zio-query to v0.7.6 by @renovate in #9197
- chore(deps): update dependency @types/react to v18.3.6 by @renovate in #9198
- Documentation: Fix The Link to OpenTracing Documentation Page by @khajavi in #9161
- chore(deps): update dependency @types/react to v18.3.7 by @renovate in #9199
- fix(deps): update dependency @zio.dev/zio-http to v3.0.1 by @renovate in #9200
- fix(deps): update dependency @zio.dev/zio-bson to v1.0.7 by @renovate in #9201
- fix(deps): update dependency @zio.dev/zio-schema to v1.5.0 by @renovate in #9204
- fix(deps): update dependency tailwindcss to v3.4.12 by @renovate in #9202
- chore(deps): update dependency @types/react to v18.3.8 by @renovate in #9206
- Remove mention of discontinued tools by @namingbe in #9213
- Typos in zpipeline.md by @dubinsky in #9219
- fix(deps): update dependency tailwindcss to v3.4.13 by @renovate in #9216
- chore(deps): update dependency prettier-plugin-tailwindcss to v0.6.8 by @renovate in #9218
- chore(deps): update dependency @types/react to v18.3.9 by @renovate in #9217
- Doc: Update info about Java versions supported by @guizmaii in #9224
- chore(deps): update dependency @types/react to v18.3.11 by @renovate in #9225
- Doc: Needs to use serviceWithZIO not serviceWith by @fancellu in #9226
- fix(deps): update dependency @zio.dev/zio-lambda to v1.0.5 by @renovate in #9230
- Fix documentation for TestLens#right by @callado4 in #9232
2.1.9
After receiving multiple reports of users failing to compile code using ZLayer
macros with v2.1.8, we decided to temporarily revert #9077 until we get to bottom of what's been causing it.
What's Changed
- fix(deps): update dependency @zio.dev/zio-query to v0.7.5 by @renovate in #9144
- Update Scala Native to 0.5.5 by @kyri-petrou in #9143
- fix(deps): update dependency @zio.dev/zio-json to v0.7.3 by @renovate in #9148
- fix(deps): update dependency @zio.dev/zio-prelude to v1.0.0-rc30 by @renovate in #9150
- Revert "makeSome refactoring" by @kyri-petrou in #9151
Full Changelog: v2.1.8...v2.1.9
2.1.8
This release brings a re-implemented ZSTM runtime that significantly improves performance under contention, enables multi-threading for Scala Native 0.5.x, squashes some minor bugs, and makes a few things run a little bit faster. And it is fully binary and source-compatible with the rest of 2.x release!
Highlights
ZSTM performance improvements
The performance of ZSTM under heavy contention has regressed over time due to various bug fixes. In this release, we reimplemented the internal runtime of ZSTM in order to significantly improve its performance under heavy contention (up to 800% improved throughput in some benchmarks!) all while achieving similar or better performance under no contention. For more details check out #9081
Scala Native multi-threading support
In the previous release, we updated Scala Native to v0.5.x but as we mentioned in the release notes, the ZIO runtime was not yet multi-threading capable. In this release, we threw most of the existing Scala Native code (which was not thread-safe) and changed it to use (mostly) the same code as the JVM artifacts. Users that currently use ZIO with Scala Native 0.5.x must enable multi-threading for Scala Native in their builds by removing nativeConfig ~= { _.withMultithreading(false) }
.
Warning
We're aware of an issue when using zio-test
on MacOS ARM64 when the debug
compilation mode is used (default). If you come across any issues, try setting the mode
to releaseFast
or releaseFull
(see here for an example)
What's Changed
- makeSome refactoring (#9077) @pablf
- Scala native multi-threading support (#9127) @kyri-petrou
- Config.Secret's length leak (#9129) @pablf
- send test finished notification for failing tests (#9139) @vincent-raman
- Whencasediscardfunctions (#9136) @Petter-K
- Optimise
Secret
creation fromString
(#9130) @guizmaii - Fix Scala Native tests not being run/reported properly (#9126) @kyri-petrou
FiberRuntime
cleanups & micro-optimizations (#9115) @kyri-petrou- Prefer
Exit
overZIO
in nested effects and other micro-optimizations (#9106) @kyri-petrou - Optimize
FiberRef#locally
to restore previous FiberRefs when unmodified (#9105) @kyri-petrou - Use an improved eq in
FiberRefs
and add shortcut forjoin
(#9100) @kyri-petrou - Add TestAspect.checks to allow running aspects within property-based specs (#9076) @mschuwalow
- Allow
cached
methods to be interrupted (#9068) @guymers - Avoid scheduling non-positive sleep timers (#9098) @kyri-petrou
- Improve
ZSTM
's performance (#9081) @kyri-petrou - Ensure
ZStream
scope is properly closed (#9088) @kyri-petrou - fix: restore non-determinism in mapOutZIOParUnordered (#9075) @regiskuckaertz
- feat: accumulate errors in ZChannel.mapOutZIOPar (#9065) @regiskuckaertz
- Fix behaviour of
ZEnvironment.empty.get[Any]
(#9074) @kyri-petrou
Other changes (CI, dependencies and documentation)
- Fix checkout on release (#9142) @kyri-petrou
- STM Documentation: Improve Writing and Fix Grammar Mistakes (#9107) @khajavi
- fix(deps): update dependency @zio.dev/zio-redis to v1 (#9141) @renovate
- fix(deps): update dependency @zio.dev/zio-logging to v2.3.1 (#9140) @renovate
- fix(deps): update dependency @zio.dev/zio-kafka to v2.8.2 (#9137) @renovate
- fix(deps): update dependency @zio.dev/zio-telemetry to v3.0.0-rc26 (#9134) @renovate
- chore(deps): update dependency @types/react to v18.3.4 (#9133) @renovate
- fix(deps): update dependency @zio.dev/zio-kafka to v2.8.1 (#9132) @renovate
- Fix flaky
ZStream
test (#9121) @kyri-petrou - Reduce CI test time & optimize zio-test execution (#9128) @kyri-petrou
- Add video component (#9111) @SvMak
- Fix typos and improve English in index.md (#9119) @nedmules-sked
- Setup improving website (#9110) @SvMak
- fix(deps): update dependency @zio.dev/zio-schema to v1.4.1 (#9114) @renovate
- fix(deps): update dependency @zio.dev/zio-schema to v1.4.0 (#9109) @renovate
- fix(deps): update dependency @zio.dev/zio-prelude to v1.0.0-rc29 (#9108) @renovate
- Ensure green CI with re-actors/alls-green (#9104) @sideeffffect
- fix(deps): update dependency @zio.dev/zio-json to v0.7.2 (#9103) @renovate
- Reduce number of CI workflows (#9096) @kyri-petrou
- fix(deps): update dependency @zio.dev/zio-optics to v0.2.2 (#9099) @renovate
- fix(deps): update dependency @zio.dev/zio-constraintless to v0.3.3 (#9097) @renovate
- Fix flaky
WeakConcurrentBagSpec
test (#9095) @kyri-petrou - Fix TestClock (#9080) @asr2003
- add new ZIO template project to the list of template projects (#9094) @lachezar
- Fix flaky
ZLayer
test (#9092) @kyri-petrou - chore(deps): update dependency cytoscape to v3.30.2 (#9085) @renovate
- fix(deps): update dependency @zio.dev/zio-prelude to v1.0.0-rc28 (#9083) @renovate
- fix(deps): update dependency @zio.dev/zio-telemetry to v3.0.0-rc25 (#9090) @renovate
- fix(deps): update dependency postcss to v8.4.41 (#9078) @renovate
- Typo in stream reference (#9064) @SADmitry
- docs: add clarification note on initialization of test bootstrap layers (#9057) @varshith257