Notable changes
ZIO
- Refactor Schedule's encoding to accurately reflect required environment (#1798) by @mschuwalow
- Add ZManaged.makeInterruptible (#2046) by @neko-kai
- Make Fiber Composition Parallel (#2038) by @adamgfraser
- Add TSet (#2029) by @mijicd
- Add TMap (#2017) by @mijicd
- Make Cause#foldLeft Stack Safe (#1990) by @adamgfraser
- Add ZManaged aliases (#1999) by @ioleo
ZIO Stream
- Add Chunk#mapAccumM and ZStreamChunk#mapAccumM (#2041) by @vasilmkd
- Implement ZSink#tapInput and ZSink#tapOutput (#2044) by @adamgfraser
- Add
ZSink.splitOn
(#2006) by @regiskuckaertz - Add error handling combinators to ZStreamChunk (#2002) by @vasilmkd
- Properly name ZStream#mapConcat* combinators (#2012) by @vasilmkd
- Add ZStreamChunk#provide combinators (#2015) by @vasilmkd
- Add ZStreamChunk#ensuring and ZStreamChunk#ensuringFirst (#2010) by @vasilmkd
- Add Chunk#filterM and ZStreamChunk#filterM (#2011) by @vasilmkd
- Correct the type signature for
zio.stream.ZSink#optional
(#1988) by @gerdreiss - Add dropUntil and takeUntil to ZStreamChunk (#1982) by @vasilmkd
ZIO Test
In this release, the mocking framework API has gone through complete overhaul to be more concise and feature better type inference. Notable changes:
- The capability tags for default mock services are moved directly to modules companion object. Use
MockClock.nanoTime
instead ofMockClock.Service.nanoTime
; - The expectations are now methods on capability tags. Use
MockRandom.nextInt._0(equalTo(1)) returns value(42)
instead ofMockSpec.expect_(MockRandom.Service.nextInt._0)(equalTo(1))(42)
; - Assertions for input are now passed as arguments, e.g.
MockConsole.putStrLn(equalTo("foo")) returns unit
; - Stubbing returns is done via static methods
value
,valueF
,valueM
,failure
,failureF
,failureM
,unit
, andnever
inzio.test.mock.Expectation
; - Dummy services (expecting no calls) are constructed using a static method
nothing
fromzio.test.mock.Expectation
. For example,val dummyConsole = Expectation.nothing[MockConsole]
; - The conversion to managed mock service is automatic and does not require any imports or type hints.
For more examples, see MockingExampleSpec.
Additional changes:
- Make flaky retry tests that die (#2045) by @adamgfraser
- Implement decorators for test environment (#2043) by @adamgfraser
- Add Expectation.nothing (#2042) by @ioleo
- Add assertCompletes (#2035) by @adamgfraser
- Refactor FailureDetails to report the entire error hierarchy (#1985) by @adamgfraser
- Implement TestAspect#ifEnv (#1962) by @adamgfraser
- Add suite selection and support multiple terms (#2014) by @reibitto
- Overhaul the mocking framework (#2000) by @ioleo