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 existing interruptChildren
, supervised
, unsupervised
, checkSupervised
, superviseStatus
have been removed in favor of daemon
, nonDaemon
, checkDaemon
and daemonStatus
.
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