ZIO v1.0.0-RC21 Release Notes
Release Date: 2020-06-19 // almost 4 years ago-
๐ We are excited to announce the release of ZIO 1.0.0-RC21, what we hope will be the final release candidate before version 1.0.
๐ From here we do not expect significant API changes and will be focused on fixing any bugs that are identified and polishing the API in anticipation of the 1.0 release. Please report any issues you experience with this release candidate so we can address them immediately. Thank you for your support!
Notable changes
ZIO Core
๐ The most significant change in this release candidate is refinements to the fiber supervision model. There is now a concept of explicit scopes, modeled by
ZScope
. Each fiber has a scope and when fibers are forked they are forked within a scope. Fibers forked withfork
are forked in the scope of the parent fiber and fibers forked withforkDaemon
are forked in the global scope. Fibers can now also be forked in another scope using theforkIn
operator. A variety of combinators are provided for composing scopes, offering powerful tools for library authors to achieve fine grained control of fiber lifetimes.๐ In general we do not expect significant user facing impact as a result of these improvements. The main changes that users should see are that fibers can now be safely forked in
zipPar
(for exampleleft.fork zipPar right
) and parallel construction of layers inZLayer
has been reenabled.๐ In addition, this release candidate features significant improvements to
Chunk
, including implementing fast single element prepend, addressing a stack safety issue, and improving the efficiency of operations on chunks created through concatenation.๐ฆ Finally, a new
TPriorityQueue
data structure has been included in thestm
package.- ๐ ZIO.fromFuture: remove lazy val (#3707) (by @simpadjo)
- ๐ Fix Type Inference Issue with ZIO.whenM and ZIO.unlessM (#3720) (by @adamgfraser)
- ๐ Fix: unsafeRunToFuture should not block (#3718) (by @runtologist)
- Align Methods on Blocking Service with Accessors (#3725) (by @adamgfraser)
- โก๏ธ Update type aliases in ZLayer from succeed (#3736) (by @ahoy-jon)
- โ Add resurrect (#3739) (by @ahoy-jon)
- Implement Fast Single Element Prepend for Chunk (#3747) (by @adamgfraser)
- ๐ Better compile errors for pattern guards in for-comp (#3530) (by @simpadjo)
- ๐ Make fromCompletionStage Referentially Transparent (#3755) (by @adamgfraser)
- ๐ Replace ZIO[R, E, A] by aliases if possible + update documentation (#3741) (by @ahoy-jon and @bernit77)
- Implement Balanced Concatenation for Chunk (#3754) (by @adamgfraser)
- โ Add conversion from Executor to Java (#3774) (by @tabdulradi)
- Implement TMap#size (#3790) (by @adamgfraser)
- Implement TMap#putIfAbsent (#3792) (by @adamgfraser)
- Implement TPriorityQueue (#3756) (by @adamgfraser)
- โก๏ธ Optimize TPriorityQueue (#3798) (by @adamgfraser)
- โ Add rightOrFailWith and leftOrFailWith and error transform docs (#3408) (by @Fristi)
- Implement Chunk#zip and Chunk#zipAll (#3810) (by @adamgfraser)
- Implement TArray#size (#3815) (by @adamgfraser)
- โก๏ธ Implement updateService (#3812) (by @adamgfraser)
- ๐ Improve Efficiency Of Chunk (#3831) (by @adamgfraser)
- ๐ Synchronize access to the FiberRefLocals in inheritRefs (#3836) (by @iravid)
- ๐ Make ChunkBuilder Public (#3837) (by @adamgfraser)
ZIO Streams
This release candidate features a variety of improvements and bug fixes thanks to feedback from users. In particular, sinks now maintain leftovers. This aspect of sink was dropped in the RC19 release, and has now been brought back due to popular demand. In addition,
ZStream#runHead
will now only consume the first element of the stream before exiting.- ๐ Fix Stream#mapMPar (#3705) (by @luis3m)
- ๐ Make ZInputStream construction lazy (#3701) (by @simpadjo)
- ZSink.collectAll and Zstream.runAll use chunk (#3587) (by @borissmidt)
- Prevent ZStream.repeatEffectChunkOption from evaluating after end (#3731) (by @iravid)
- ๐ Fix ZStream#intersperse (#3730) (by @iravid)
- Correct a wrong type parameter name in method doc for ZStream.aggregateAsyncWithin (#3734) (by @svroonland)
- โ Delete Transducer#zip (#3742) (by @simpadjo)
- โ Add ZStream.repeat,repeatWith,tick (#3749) (by @iravid)
- ๐ Fix ZStream#zipWithLatest (#3752) (by @luis3m)
- โ Add ZSink.fromFile functionality (#3712) (by @lvitaly)
- ๐ Fix interruption issue in aggregateAsyncWithinEither (#3751) (by @svroonland)
- ๐ Make ZStream.runHead only pull one element (#3768) (by @iravid)
- โ Add back support for leftovers in ZSink (#3722) (by @simpadjo)
- โ Add ZStream.fromTcpSocketServer (#3677) (by @regis-leray)
- โช Restore ZSink#collectAllWhileWith (#3779) (by @simpadjo)
- ZSink#untilOutputM should respect leftovers (#3778) (by @simpadjo)
- โ Add ZStream#runManaged (#3764) (by @simpadjo)
- ๐ Fix ZStream#debounce interruption issue (#3765) (by @luis3m)
- ๐ Fix ZStream.grouped (#3819) (by @simpadjo)
- โ Add ZSink.managed (#3788) (by @simpadjo)
- Transducer.collect*N shouldn't emit empty chunks (#3827) (by @simpadjo)
- Introduce Concept of Explicit Scopes (#3829) (by @jdegoes)
- Reenable Parallel Construction of Layers (#3833) (by @adamgfraser)
- โ Add a new
fromOptionError
operator (#3813) (by @paulpdaniels)
โ ZIO Test
- โ Add Additional Type Aliases for Laws (#3743) (by @adamgfraser)
- ๐ Fix Type Signature of Contravariant Compose Law (#3746) (by @adamgfraser)