New Features
-
Actors: The new
kyo-actor
module introduces type-safe actors built on top of other effects likeChannel
andPoll
. The API enables composition with other effects both within an actor implementation and in itsActor.run
creation scope. For example, actors can requireEnv
values in their initialization or leverageRetry
andAbort
to compose supervision strategies in their bodies. This initial version includes local actors only, but theSubject
abstraction is designed to enable remote communication. The goal is eventually integrating the module withkyo-aeron
for distributed actors. This work was based on a collaboration with @DamianReeves. Thank you! (by @fwbrasil) -
Abort with literals: The
Abort
effect now supports short-circuiting computations with a literal value for situations where creating a new type for aborting isn’t convenient. For instance,Abort.literal.fail["invalid"]
will provide a computation with a pendingAbort["invalid"]
that can be handled viaAbort.literal.run
. (by @hearnadam) -
Playwright browser integration: The
kyo-playwright
module provides a new Browser effect for programmatic browsing with support for several features like screenshotting, mouse usage, and extracting readable content. The effect also provides a low-level API viaBrowser.Op
classes designed to enable LLM interaction via tools. (by @fwbrasil)
Improvements
-
Async.fillIndexed
method to repeat a computation multiple times with their indexes. (by @fwbrasil) -
Stream.splitAt
method to take a specific number of elements out of a stream and return it with a new stream with the remaining emissions. (by @HollandDM) -
Var.updateWith
method to enable updating a var and performing a transformation in a single allocation. (by @fwbrasil) -
Scaladocs in
kyo-core
were reviewed and improved to better document the motivation of effects and their behaviors. (by @fwbrasil) -
The repository now has a CONTRIBUTING.md with general information on how to contribute. (by @c0d33ngr)
-
The
kyo-combinators
module had a major refactoring, reorganizing the code into multiple files and making the APIs and implementations more consistent with the rest of the codebase. (by @johnhungerford) -
We’re starting to explore providing first-class support for Java in the
kyo-scheduler
modules. As a first step, we’ve validated that the current APIs are usable from Java. (by @hearnadam) -
Most of Kyo’s classes were marked as
Serializable
, enabling support for Java serialization of computations. The main exception isFiber
s and classes that hold references to them since persisting the state of a running fiber would produce inconsistent behaviors. (by @fwbrasil)
Fixes
-
Channel
had an edge case with zero capacity where the behavior wasn’t well defined. This version includes a new implementation with proper support for zero-capacity channels. (by @johnhungerford) -
Path
had an encoding issue in Windows that has been fixed. (by @ffilipus) -
A memory leak related to a single fiber handling multiple parking operations and their interruptions was fixed. (by @fwbrasil)
Breaking Changes
-
The
pipe
method in the pending type (<
) has been renamed tohandle
to better indicate that the API is meant primarily for effect handling even though it still supports arbitrary transformations. (by @fwbrasil) -
The project used to use a pattern with
Ops
classes to enable multiple type parameter groups. These were now migrated to the new clause interleaving language feature. This change improves usability with the newly namedhandle
method with effect handlers. (by @fwbrasil) -
Var.setAndThen
has been renamed toVar.setWith
to follow the new naming pattern in the codebase whereWith
indicates that the operation takes a continuation function. (by @fwbrasil)
New Contributors
- @ffilipus made their first contribution in Correct path separator split. Fixes #1106. by ffilipus · Pull Request #1109 · getkyo/kyo · GitHub
Full Changelog: Comparing v0.17.0...v0.18.0 · getkyo/kyo · GitHub