Scalaz ZIO v1.0.0-RC21 Release Notes

Release Date: 2020-06-19 // 15 days 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 with fork are forked in the scope of the parent fiber and fibers forked with forkDaemon are forked in the global scope. Fibers can now also be forked in another scope using the forkIn 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 example left.fork zipPar right) and parallel construction of layers in ZLayer 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 the stm package.

    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.

    ✅ ZIO Test


Previous changes from v1.0.0-RC20

  • 🛠 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.

    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)