Skip to content

Releases: getkyo/kyo

v0.11.0

23 Aug 19:16
c7f2f78
Compare
Choose a tag to compare

This is Kyo's largest release so far! It contains a major redesign of the library, introduces several new effects, and is a significant leap towards Kyo 1.0 🚀

  • Layers: The Layer effect provides managed Env values inspired by ZIO. It offers APIs for manual composition as well as a macro-based Layer.init method that automatically wires multiple layers. Layers use a new Memo effect to manage the lifecycle of components and support any other effects that may be required by their initialization. Developed by @hearnadam @kitlangton
  • Caliban Integration: The Resolvers effect integrates with Caliban and kyo-tapir to serve GraphQL queries. The integration is designed so queries can contain arbitrary Kyo effects. Developed by @ghostdogpr
  • Combinators: The Zikyo project is now incorporated into Kyo's main repository in the kyo-combinators module. It provides extension methods to the pending type and the Kyo companion object resembling ZIO's approach with a unified API for multiple effects. Developed by @johnhungerford
  • Low-allocation Data Types: The new kyo-data module is published as a standalone artifact without a dependency on the effect system. It contains new data type implementations with a focus on performance. Developed by @hearnadam @kitlangton @fwbrasil
    • Maybe: An allocation-free alternative to Option, including proper support for nesting.
    • Result: A low-allocation data type that merges the functionality of Try and Either in a single monad.
    • TypeMap: A type-safe heterogeneous map implementation based on Kyo's allocation-free tags.
  • System Utilities: The kyo-os-lib module has been removed and a new implementation with support for process spawning (Process) and file operations with streaming (Path) has been introduced in kyo-core. Developed by @pablf
  • Forking with Effects: Fibers can now be forked with several effects like Abort, Env, and Random. Developed by @fwbrasil
  • Stack-safe Recursion: Kyo's new design tracks the execution depth of computations and automatically inserts effect suspensions to provide stack safety by default. Developed by @fwbrasil
  • Stack Traces: Computations now collect execution traces that are automatically injected in stack traces of exceptions with a short snippet of the source code. Developed by @fwbrasil
  • Debug Effect: Debug offers APIs to log the result of computations, trace their execution, and inspect inputs and outputs. The solution uses Kyo's Frame, which provides source code snippets of transformations. Developed by @fwbrasil. Example output:
image

A special thanks to @hearnadam for all the PR reviews and contributions! 🙏

Breaking Changes

This version introduces several breaking changes:

  • The Fibers effect is renamed Async and the Fibers.init method is renamed Async.run.
  • The Fiber type now has an additional type parameter Fiber[E, A], where E tracks typed errors translated from/to Abort and A represents the result of the computation.
  • The .pure method in the pending type is renamed to .eval since it might be a computation with internal suspensions to ensure stack safety.
  • Most effects were renamed from plural to singular.
  • Effects that integrate with external types like Resolvers for integration with Calibran and Routes for Tapir are still named using plurals.

New Contributors

Full Changelog: v0.10.2...v0.11.0

v0.10.2

27 May 04:18
Compare
Choose a tag to compare

What's Changed

This change contains a variety of fixes, improvements, mostly surrounding Kyo's scheduler

  • Blocking: this release improves blocking performance significantly
  • Scheduler: this release prepares for improvements to Kyo's Top
  • ZIO Interop: you can now use the kyo-scheduler via extension of KyoSchedulerZIOAppDefault

Changes

New Contributors

Full Changelog: v0.10.1...v0.10.2

v0.10.1

21 May 04:12
7ff69fa
Compare
Choose a tag to compare

What's changed

  • This release fixes the output of the Scheduler's Top when using the Console
  • You can enable console output for Top via property: -Dkyo.scheduler.enableTopConsoleMs=n - where n is > 0

Changes

Full Changelog: v0.10.0...v0.10.1

v0.10.0

19 May 17:46
0f39c33
Compare
Choose a tag to compare

Kyo v0.10.0

This version introduces new major features and important fixes. Main highlights:

  1. kyo-tag: Kyo now has a new type Tag implementation that provides allocation-free sub-type checking. This new solution addresses safety issues with effect handling in generic scopes and its improved performance unblocks some important new features and fixes. A separate artifact kyo-tag is produced with no dependency on any other Kyo modules, enabling the use of the new Tag in isolation by other projects.
  2. kyo-zio: The initial implementation of the ZIOs effect is included in this new release. It provides a seamless integration between Kyo and ZIO via two methods: ZIOs.get transforms a ZIO computation into a Kyo one, and ZIOs.run transforms Kyo computations into ZIO. These methods can even be used in a nested fashion, enabling the gradual adoption of Kyo within a ZIO codebase. Feedback is appreciated!
  3. kyo-scheduler-zio: Provides a ZIO Runtime instance configured to replace ZExecutor with Kyo's adaptive scheduler. Initial benchmarking shows promising performance improvements. We're looking for early adopters of this new module. It's also a standalone module without a dependency on kyo-core.
  4. Java Futures integration: Kyo fibers now integrate with Java futures via Fibers.fromCompletionStageand Fibers.fromCompletionStageFiber. Thank you @calvinlfer!
  5. Flat Check Fixes: The Flat implicit is essential to guarantee the safe execution of Kyo computations. This mechanism was failing to engage properly in some scenarios; this version fixes those cases.
  6. Exception handling regression: A performance regression was detected by one of the EasyRacer scenarios. The regression was narrowed down to a change in Kyo's exception handling, which has been reverted in this release. The work on this regression also produced a number of other smaller optimizations.
  7. Scheduler Top: A new command-line utility to observe the execution of Kyo's scheduler is provided as a main class under kyo.scheduler.util.Top. The solution works via JMX beans and is designed to be used in production environments as well. Example output:
image

Special thanks to @hearnadam for all the contributions!

What's Changed

New Contributors

Full Changelog: v0.9.3...v0.10.0

v0.9.3

04 May 17:41
0a0c4c1
Compare
Choose a tag to compare

Kyo v0.9.3

Kyo 0.9.3 is a fairly substantial change from 0.9.2. Notable releases include:

  • The core scheduler has been split to a distinct module, cross compiled for Scala 2/3
  • zio-test integration has been published under kyo-test
  • An allocation free Duration module has been created, with a Long backing type
  • Improved encodings of Envs, Aborts, Sums, and more!

What's changed

New Contributors

Full Changelog: v0.9.2...v0.9.3