ZIO v1.0.0-RC17 Release Notes
Release Date: 2019-11-18 // over 4 years ago-
Notable changes
๐ This release contains major changes related to how fiber supervision is working.
The new behavior is that a fiber will automatically be interrupted when its parent fiber is interrupted. To make forked fibers independent of their parents, use.daemon
.
๐ Previously existinginterruptChildren
,supervised
,unsupervised
,checkSupervised
,superviseStatus
have been removed in favor ofdaemon
,nonDaemon
,checkDaemon
anddaemonStatus
.ZIO
- Complete overhaul of supervision (#2169) by @jdegoes
- โ Add fiber dumps with pretty printing for easier diagnostics (#2228) by @jdegoes
- โ Add a new implicit instance
CanFail[E]
which provides implicit evidence that an effect with an error type E can fail, that is that E is not equal to Nothing. Requires such evidence to exist for ZIO combinators such as orElse that only make sense if an effect can fail (#2049) by @adamgfraser - Similarly, implements
NeedsEnv
so that useless combinators involving effects that don't require an environment don't compile (#2065) by @adamgfraser - โ Add
ZIO.fromFunctionFuture
(#1961) by @jczuchnowski effectAsync
should not resume fiber twice after interruption (#1939) by @darl- โ Add
withFilter
(#2114) by @wi101 - ๐ Use
URIO
in type signatures where possible (#2092) by @joroKr21 - โ Add
ZIO#doUntil
andZIO#doWhile
(#2147) by @adamgfraser Ignore
should not recover from unchecked exceptions (#2148) by @alexvanolst- ๐ Reimplement
RaceWith
in the ZIO runloop for better performance (#2091) by @YuvalItzchakov - Adapt
ZIO.someOrFailException
to improve interop with error types (#2087) by @mlangc - ๐ Fix
Cause
Definition of Equals and HashCode (#2220) by @adamgfraser - ๐ Improve implementation of
InterruptStatus#isInterruptible
(#2188) by @sirthias
ZIO Stream
- โ Add
ZStreamChunk#mapError
(#2064) by @vasilmkd - โ Add missing
extends Serializable
to ZStream codebase (#2063) by @vasilmkd - ๐ Make
ZStream.empty
,ZStream.fail
,ZStream.effectAsync
and others safe to pull again (#2051 #2139 #2189 #2197 #2198 #2199 #2227) by @vasilmkd - โ Add
ZSink.fromFunctionM
(#2112) by @regiskuckaertz - โ Add
ZStream#collectM
,collectWhileM
(#2094) by @saraiva132 - ๐ Make
ZStream#chunkN
return an instance ofZStreamChunk
(#2125) by @saraiva132 - ๐ Rename
transduce
,aggregate
andaggregateWithin
toaggregate
,aggregateAsync
andaggregateAsyncWithin
(#2099) by @simpadjo - โ Add new shorthands for running ZStream:
runHead
andrunLast
(#2113) by @alexvanolst - โ Add
access
andaccessM
to ZStream (#2249) by @pk044 - โ Add more
ZStream#distributed
based combinators (#2157) by @mschuwalow
โ ZIO Test
- โ Add a new assertion
compile
that requires the specified string to be valid Scala code (#2215) by @adamgfraser - โ Make Companion Objects of Test Environments Serializable (#2067) by @adamgfraser
- โ
Implement
TestClock#setDateTime
(#2072) by @adamgfraser - Implement
Gen#long
(#2132) by @adamgfraser - โ
Implement Overloaded Version of
TestAspect#nonFlaky
(#2140) by @adamgfraser - โ
Implement
Except
Variants of Test Aspects (#2146) by @adamgfraser - โ Adding
hasFirst
,hasLast
andhasAt
assertions (#2156) by @13h3r - ๐จ Refactor
ZSpec
to Move All Test Failures to Error Channel (#2145) by @adamgfraser - Limit number of runs when using
flaky
(#2170) by @adamgfraser - โ
Implement
TestAspect#nonFlakyPar
(#2176) by @adamgfraser - ๐ Fix Type Inference Issue in
checkM
Variants (#2175) by @adamgfraser - ๐ Fix Naming Conflict with
TestAspect#ignore
(#2184) by @adamgfraser - โ
Suspend Effects in
testM
(#2190) by @adamgfraser - โ Implement Warnings for Test Clock (#2191) by @adamgfraser
- ๐ฆ Move Check Variants Back Into Package Object (#2181) by @adamgfraser
- ๐ Improvements to
provideManagedShared
(#2192) by @adamgfraser - ๐ Support Labeled Assertions (#2200) by @adamgfraser
- โ Prevent Spurious TestClock Warnings (#2210) by @adamgfraser
- โ Remove Creation of New Runtimes (#2213) by @adamgfraser
- ๐ New Test Aspect
only
that when applied on a suite will ignore all tests that don't have the given substring in their label (#1838) by @dkarlinsky - ๐ Fix Bug in
Gen#alphaNumericChar
(#2233) by @adamgfraser - ๐ Improve Order of Parameters in
checkSome
(#2224) by @adamgfraser - ๐ Fix Type Inference Issue With
TestAspect#retry
(#2218) by @adamgfraser - โ Add generators for time datatypes (#2173) by @dieproht
STM
- โ Add
TMap.merge
(#2097) by @regiskuckaertz - โ Remove notion of immutability from TArray (#2111) by @Stefanqn
- ๐ Make
TArray
factories return STM (#2141) by @smart-ass - ๐ Support keys with negative hashCodes in
TMap
(#2203) by @laurynasl-wix
โฑ Schedule
- โฑ Rename
ZSchedule
toSchedule
(#2242) by @adamgfraser - ๐ Rename
logInput
/logOutput
totapInput
/tapOutput
(#2050) by @mschuwalow - ๐ Improve
onDecision
signature (#2089) by @YuvalItzchakov
ZManaged
- ๐ Make parts of
ZManaged
private (#2124) by @stkeky - โ Add
asError
,catchAllCause
,catchSomeCause
,collect,
collectM` (#2135 #2137 #2149) by @dkarlinsky - โ Add
sandboxWith
,eventually
(#2151 #2161) by @saraiva132 - โ Add
allocated
(#2158) by @mschuwalow - โ Add
absorb
andabsorbWith
(#2116) by @alexvanolst - โ Add
ZManaged.memoize
(#2016) by @mlangc
Chunk
- In
Chunk#flatMap
, construct result array from the back (#2165) by @vasilmkd - โ Add
collectM
,collectWhileM
combinators (#2150) by @saraiva132 - ๐ Fix
Chunk.size
that was always returning 0 (#2217) by @ajaychandran
Semaphore
- ๐ Deprecate
acquire
,acquireN
,release
,releaseN
in favor ofwithPermits
(#1523) by @adamgfraser
Duration
- ๐ Use
toMillis
for java infinity duration (#2209) by @TapanVaishnav