A lightweight, distinctly Scala take on functional abstractions, with tight ZIO integration
This release contains support for ZIO 2.0.0-RC1
.
This release reverts the changes to the encoding to ZPure
in the previous relate candidate. We will explore other ways to continue to improve the ergonomics of ZPure
. This release also contains various bug fixes and improvements to the new smart types functionality.
This update is packed with several new features!
First, smart types are getting better thanks to work by @jorge-vasquez-2301 and @kitlangton. Assertions about smart types are now checked at compile time instead of runtime, which means you find out about issues earlier and don't have to deal with that possibility of failure in the rest of your code.
Second, ZPure
is getting improved type inference. You shouldn't have to specify the state type anymore if you are not using it, which eliminates the need to specify type parameters in some cases.
Third ZIO Prelude no longer depends on ZIO Test. This means some operators that relied on ZIO Test assertions no longer exist, but these can be replaced with variants that take a normal predicate. This creates a stronger separation between test and production code and makes it even easier to get started with ZIO Prelude.
With these changes we believe we have the features we want for a 1.0 release, other than automatic derivation of functional abstractions which could potentially be added later. Following the release of ZIO 2.0 will be putting the final polish on the library to prepare for a 1.0 release.
As always, please let us know your feedback and thank you for your support.
This release contains substantially enhanced documentation along with other improvements.
doc
on all Scala versions in CI (#700) @sideeffffectfoldMapM
to ForEach
(#656) @felherreduceIdentity
in the comment of fold
on ForEach
(#654) @felhertest
(#637) @sideeffffectThis release contains support for Scala 3.0.0-RC3
. It also makes ZValidation
its own data type, implements additional operators, and renames some existing operators to more domain specific names to give the best possible experience for handling the possibility of multiple errors. In particular, ZValidation.collectAll
is now ZValidation.validate
and ZValidation.foreach
is now ZValidation.validateWith
. The existing operator names are still available as extension methods through ForEach
.
This release contains a fix for a bug regarding the composition of state when using error handlers in ZPure
. It also contains a new module with type class instances for parallel collections from the scala-parallel-collections
library. Upgrading is recommended for all users.
Validation.fromPredicate
@sideeffffect (#537)This release brings support for the latest version of Scala 3 and Scala Native as well as smart constructor variants of NewTypeF
and SmartTypeF
, build out of the arrow hierarchy under AssociativeCompose
, additional documentation, and further generalization of ZPure
.
In particular, ZPure
now includes a W
type parameter representing a logging effect and allow accumulating errors similar to the way ZIO
does with Cause
. "Parallel" operators such as zipWithPar
will perform both computations and accumulate errors, as with the previous behavior of Validation#zipWithPar
. The full set errors that occurred can be exposed and transformed using operators like the ones on ZIO
such as foldCauseM
. Validation
is now a type alias for ZPure
.
Your feedback is greatly appreciated!
Initial release.