New Features
-
Actors: The new
kyo-actormodule introduces type-safe actors built on top of other effects likeChannelandPoll. The API enables composition with other effects both within an actor implementation and in itsActor.runcreation scope. For example, actors can requireEnvvalues in their initialization or leverageRetryandAbortto compose supervision strategies in their bodies. This initial version includes local actors only, but theSubjectabstraction is designed to enable remote communication. The goal is eventually integrating the module withkyo-aeronfor distributed actors. This work was based on a collaboration with @DamianReeves. Thank you! (by @fwbrasil) -
Abort with literals: The
Aborteffect 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-playwrightmodule 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.Opclasses designed to enable LLM interaction via tools. (by @fwbrasil)
Improvements
-
Async.fillIndexedmethod to repeat a computation multiple times with their indexes. (by @fwbrasil) -
Stream.splitAtmethod 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.updateWithmethod to enable updating a var and performing a transformation in a single allocation. (by @fwbrasil) -
Scaladocs in
kyo-corewere 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-combinatorsmodule 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-schedulermodules. 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 isFibers and classes that hold references to them since persisting the state of a running fiber would produce inconsistent behaviors. (by @fwbrasil)
Fixes
-
Channelhad 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) -
Pathhad 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
pipemethod in the pending type (<) has been renamed tohandleto 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
Opsclasses to enable multiple type parameter groups. These were now migrated to the new clause interleaving language feature. This change improves usability with the newly namedhandlemethod with effect handlers. (by @fwbrasil) -
Var.setAndThenhas been renamed toVar.setWithto follow the new naming pattern in the codebase whereWithindicates 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