v0.17.0
This is likely one of the last releases before the 1.0-RC cycle! Please report any issues or difficulties with the library so we can address them before committing to a stable API ๐
Also, Kyo has a new logo! Thank you @Revod!!! (https://github.com/getkyo/kyo/pull/1105)
New features
-
Reactive Signal: A new Signal implementation has been introduced in
kyo-core, inspired by fs2. Signals can change value over time and these changes can be listened for via the methods that integrate withStream. (by @fwbrasil in https://github.com/getkyo/kyo/pull/1082) -
Consistent collection operations: Handling collections with the
Kyocompanion object is very flexible, while doing the same withAsyncused to be less convenient and with a completely different API approach. In this release, a new set of methods to handle collections was added to the Async effect, mirroring the naming of theKyocompanion. With this, most collection operations can either useKyofor sequential processing orAsyncfor concurrent/parallel processing. (by @fwbrasil in https://github.com/getkyo/kyo/pull/1086) -
Partial error handling: The
Aborteffect had a limitation that doesn't allow the user to handle only expected failures without panics (unexpected failures). This release introduces APIs to handle aborts without panics in the Abort.*Partial methods. Similarly, a new Result.Partial type was introduced to represent results without panics. (by @johnhungerford in https://github.com/getkyo/kyo/pull/1042) -
Record staging: Records can now be materialized from a type signature using a function to populate the values. This feature is meant to enable the creation of DSLs. For example, given a record type
"name" ~ String & "age" ~ Int, it's possible to stage it for a SQL DSL as"name" ~ Column[String] & "age" ~ Column[Int]. (by @road21 in https://github.com/getkyo/kyo/pull/1094) -
Aeron integration: The new Topic effect in the
kyo-aeronmodule provides a seamless way to leverage Aeron's high-performance transport with support for both in-memory IPC and reliable UDP. Stream IDs are automatically derived from type tags, providing typed communication channels, and serialization is handled via upickle. (by @fwbrasil in https://github.com/getkyo/kyo/pull/1048) -
Direct Memory in Scala Native: The Memory effect provides direct memory access with automatic handling of resources via scoping. The module now also has support for Scala Native! (by @akhilender-bongirwar in https://github.com/getkyo/kyo/pull/1072)
Improvements
-
Unified Isolate mechanism: In this release, two mechanisms used to provide support for effects with forking,
IsolateandBoundary, were merged into a single implementation with better usability.Isolate.Contextualprovides isolation for contextual effects likeEnvandLocal, whileIsolate.Statefulis a more powerful mechanism that is able to propagate state with forking and restore it. A few effects provide defaultIsolateinstances but not all. For example, given the problematic semantics of mutable state in the presence of parallelism,Vardoesn't provide anIsolateevidence, which disallows its use with forking by default and requires explicit activation (seeVar.isolate.*). (by @fwbrasil in https://github.com/getkyo/kyo/pull/1077) -
More convenient discarding methods: Methods that execute a provided function but don't use its result used to require functions to return
Unit. In this release, methods were changed to acceptAnyas the result of the function. For example, theunitcall inResource.ensure(queue.close.unit)can now be omitted:Resource.ensure(queue.close). (by @johnhungerford in https://github.com/getkyo/kyo/pull/1070) -
Less verbose errors: Kyo logs rich failures including a snippet of the failing code for a better development experience. This behavior is problematic in production systems due to the verbosity. A new Environment mechanism was introduced to detect if Kyo is executing in a development mode and disable the rich failure rendering if not. The detection mechanism currently only supports SBT, but the user can enable the development mode via a system property. (by @fwbrasil in https://github.com/getkyo/kyo/pull/1057)
New Contributors ๐
- @rcardin made their first contribution in https://github.com/getkyo/kyo/pull/1069
- @matteobilardi made their first contribution in https://github.com/getkyo/kyo/pull/1083
- @akhilender-bongirwar made their first contribution in https://github.com/getkyo/kyo/pull/1072
- @Revod made their first contribution in https://github.com/getkyo/kyo/pull/942
Full Changelog: https://github.com/getkyo/kyo/compare/v0.16.2...v0.17.0