This release features a number of important bugfixes for ZStream. Upgrading is advised!
Notable changes
ZIO Core
The return type for the run
method in zio.App
has changed to ZIO[ZEnv, Nothing, ExitCode]
. ExitCode
is a simple wrapper around an integer, with handy constructors for error and success (ExitCode.success
, ExitCode.failure
). In addition, a convenience combinator ZIO#exitCode
was added that converts a ZIO
value to an ExitCode
.
- [Breaking] Add App ExitCode (#3583) (by @luis3m)
- Add Chunk#nonEmptyOrElse (#3687) (by @simpadjo)
- Implement Fast Single Element Append for Chunk (#3416) (by @adamgfraser)
- Fix Chunk.splitWhere (#3644) (by @KadekM)
- Add combinators collectSome and collectSomePar (#3568) (by @ghidei)
- Add ZIO#validateWith (#3617) (by @luis3m)
- ensure ZIO#fromFutureJava runs the parameter only once (#3702) (#3704) (by @fsarradin)
ZIO Streams
We've seen in the last release that removing Take[E, A]
and relying on Exit[Option[E], Chunk[A]]
instead degrades ergonomics significantly when working with ZStream. So we went ahead and re-added it, this time as a wrapper over Exit[Option[E], Chunk[A]]
. Apologies for the inconvenience!
- Modify ZStream#mergeWith implementation to use a queue (#3691) (by @luis3m)
- [Breaking] Add back ZStream.Take (#3669) (by @luis3m)
- Modify ZStream#debounce to take chunk last element (#3689) (by @luis3m)
- Fix ZTransducer.splitLines (#3690) (by @iravid)
- Fix debounce to properly handle empty chunks (#3611) (by @luis3m)
- Fix memory leak in ZStream#forever (#3681) (by @iravid)
- Add ZStream#zipWithNext & ZStream#zipWithPrevious (#3596) (by @luis3m)
- Allow schedule on ZStream.repeatEffectWith rely on effect value (#3618) (by @luis3m)
- Fix ZStream.fromInputStream (#3678) (by @iravid)
- Maintain ZStream's laziness on chunks at the expense of performance (#3666) (by @iravid)
- Add ZStream#flattenTake (#3661) (by @luis3m)
- Fix ZSink#collectAllWhileWith (#3665) (by @simpadjo)
- [Breaking] ZSink.fromOutputStream should return Long (#3652) (by @simpadjo)
- Fix ZStream#toInputStream error handling (#3700) (by @simpadjo)
- Add ZStream.fromFile (#3697) (by @iravid)
ZIO Test
- ZIO Test: Close Resources Earlier In ProvideLayerShared (#3696) (by @adamgfraser)