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