ZIO v1.0.0-RC16 Release Notes
Release Date: 2019-10-28 // over 4 years ago-
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