This minor release contains various bug fixes, performance improvements and quality of life improvements.
One notable addition is a new runtime flag called EagerShiftBack
to force shifting back to the default executor immediately after running a blocking computation (currently it stays on the blocking threadpool until the next yield or the fiber terminates). It is disabled by default so there is no change in behavior compared to older versions.
What's Changed
- Extend
ControlThrowable
on control flow exceptions by @ghostdogpr in #8849 - Add
ZIO.config[A]
API to load config using implicit by @kpritam in #8836 - Optimize foreachPar when using bounded parallelism by @ghostdogpr in #8847
- optimize ZStream's mapZIOPar and mapZIOParUnordered by @eyalfa in #8819
- fix: implementation leak in pipeToOrFail by @regiskuckaertz in #8860
- Improve environment performance by @kyri-petrou in #8846
- avoid allocating Fiber.Status to process FiberMessage.Stateful by @fwbrasil in #8865
- Allow "unsafe" creation of a
Queue
by @kyri-petrou in #8871 - Maintain freshness of the ZLayer by @kpritam in #8870
- Ignore name mapping for keys of maps while reading configs (#8740) by @987Nabil in #8878
- Add runtime flag to enable / disable execution shift deferring by @kyri-petrou in #8854
- Repurpose
CooperativeYielding
flag to determineFiberRuntime
should auto-yield by @kyri-petrou in #8884 - add: missing
TestLens#cause
by @hearnadam in #8876 - Fix ZPool hangs during parallel item acquisition after invalidation (… by @daemas in #8833
- ZStream scalajs readFile by @kaplan-shaked in #8853
- Avoid allocation on ZIO#unit by @kyri-petrou in #8888
- Micro-optimize
ZIO.attempt
andZIO.suspend
by @kyri-petrou in #8887 - Fix STM retry/orElse semantics by @BijenderKumar1 in #8845
- optimize Stream flatMapPar by @eyalfa in #8863
- Add test lenses for Try by @Roman-Statsura in #8891
- Add working knownSize implementation to ChunkBuilder instances (Scala 2.13+) by @seakayone in #8892
- Avoid allocation in
ZEnvironment#get
by @kyri-petrou in #8906 - Allow removal of metrics by @calvinlfer in #8900
- Make layer's generated code deterministic by @reimai in #8914
- Change ZTestLogger.default layer return type to Unit by @andrzejressel in #8902
Other changes (CI, dependencies and documentation)
- chore(deps): update react monorepo by @renovate in #8842
- fix(deps): update dependency @zio.dev/zio-prelude to v1.0.0-rc26 by @renovate in #8851
- Documentation For Log Annotation Mechanisms in ZIO by @khajavi in #8857
- Documentation of ZKeyedPool by @khajavi in #8856
- Fix Scala Native build by @kyri-petrou in #8864
- fix(deps): update dependency @zio.dev/zio-http to v3.0.0-rc7 by @renovate in #8862
- fix(deps): update dependency @zio.dev/zio-logging to v2.2.4 by @renovate in #8859
- custom executor benchmark by @fwbrasil in #8869
- Improve ZIO Test Assertion Documentation by @khajavi in #8868
- Highlighted Projects by @khajavi in #8881
- chore(deps): update dependency @types/react to v18.3.3 by @renovate in #8896
- Remove Quill for the "community projects" page, as it's now an official one by @guizmaii in #8898
- fix(deps): update dependency @zio.dev/zio-logging to v2.3.0 by @renovate in #8911
- fix(deps): update dependency @zio.dev/zio-http to v3.0.0-rc8 by @renovate in #8910
- fix(deps): update dependency @zio.dev/zio-sbt to v0.4.0-alpha.27 by @renovate in #8909
- Rename file to match class name by @ajaychandran in #8913
- Add zio-kafka and zio-prelude to the Highlights Projects by @guizmaii in #8897
- fix(deps): update dependency @zio.dev/zio-prelude to v1.0.0-rc27 by @renovate in #8915
- Attempt at fixing random ZLayer compiler bug by @kyri-petrou in #8917
- Fix flaky test in ReentrantLockSpec by @kyri-petrou in #8916
New Contributors
- @kpritam made their first contribution in #8836
- @fwbrasil made their first contribution in #8865
- @daemas made their first contribution in #8833
- @BijenderKumar1 made their first contribution in #8845
- @seakayone made their first contribution in #8892
- @reimai made their first contribution in #8914
Full Changelog: v2.1.1...v2.1.2