Releases: getkyo/kyo
Releases · getkyo/kyo
v0.11.0
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 managedEnv
values inspired by ZIO. It offers APIs for manual composition as well as a macro-basedLayer.init
method that automatically wires multiple layers. Layers use a newMemo
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 andkyo-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 theKyo
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
andEither
in a single monad. - TypeMap: A type-safe heterogeneous map implementation based on Kyo's allocation-free tags.
- Maybe: An allocation-free alternative to
- 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 inkyo-core
. Developed by @pablf - Forking with Effects: Fibers can now be forked with several effects like
Abort
,Env
, andRandom
. 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'sFrame
, which provides source code snippets of transformations. Developed by @fwbrasil. Example output:
A special thanks to @hearnadam for all the PR reviews and contributions! 🙏
Breaking Changes
This version introduces several breaking changes:
- The
Fibers
effect is renamedAsync
and theFibers.init
method is renamedAsync.run
. - The
Fiber
type now has an additional type parameterFiber[E, A]
, whereE
tracks typed errors translated from/toAbort
andA
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 andRoutes
for Tapir are still named using plurals.
New Contributors
- @carlosedp made their first contribution in #449
- @pablf made their first contribution in #428
- @taretmch made their first contribution in #488
- @mobley-trent made their first contribution in #415
Full Changelog: v0.10.2...v0.11.0
v0.10.2
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
- Rename Zio -> ZIO by @hearnadam in #418
- add support for KyoSchedulerZIOAppDefault by @hearnadam in #401
Changes
- Update client3:core to 3.9.7 by @scala-steward in #402
- sbt build: use CrossType.Full for all modules by @fwbrasil in #405
- fix jmh benchmarks by @fwbrasil in #407
- Fix typo by @steinybot in #408
- zio-http bench by @hearnadam in #406
- Make kyo build with Intellij (#138) by @987Nabil in #404
- Update vertx-core, vertx-web to 4.5.8 by @scala-steward in #416
- scheduler: dispatch java interrupts by @fwbrasil in #417
New Contributors
- @steinybot made their first contribution in #408
Full Changelog: v0.10.1...v0.10.2
v0.10.1
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
- wheren
is > 0
Changes
- use ZIO v2.1.1 by @fwbrasil in #393
- avoid implicit conversions by @fwbrasil in #394
- Use
Top.print
to outputScheduler.Status
to console by @hearnadam in #397 - scheduler: fix console top to show deltas by @fwbrasil in #399
Full Changelog: v0.10.0...v0.10.1
v0.10.0
Kyo v0.10.0
This version introduces new major features and important fixes. Main highlights:
- 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 artifactkyo-tag
is produced with no dependency on any other Kyo modules, enabling the use of the newTag
in isolation by other projects. - 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, andZIOs.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! - kyo-scheduler-zio: Provides a ZIO
Runtime
instance configured to replaceZExecutor
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 onkyo-core
. - Java Futures integration: Kyo fibers now integrate with Java futures via
Fibers.fromCompletionStage
andFibers.fromCompletionStageFiber
. Thank you @calvinlfer! - 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. - 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.
- 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:
Special thanks to @hearnadam for all the contributions!
What's Changed
- Make HasAborts public again by @johnhungerford in #326
- Update client3:core to 3.9.6 by @scala-steward in #318
- Update zio, zio-concurrent, zio-test, ... to 2.1.0-RC5 by @scala-steward in #319
- Update scala-library to 2.13.14 by @scala-steward in #320
- Update sbt-scoverage to 2.0.12 by @scala-steward in #321
- Update log4cats-core, log4cats-slf4j to 2.7.0 by @scala-steward in #322
- zio integration by @fwbrasil in #303
- FFI for Java's CompletionStage by @calvinlfer in #324
- http client benchmarks by @fwbrasil in #328
- reproduce flat check bug (#327) by @fwbrasil in #334
- scheduler: don't check the availability of a submitter worker by @fwbrasil in #333
- requests: avoid switching to ForkJoinPool by @fwbrasil in #330
- fix Fibers.Interrupted to avoid lock contention in
Throwable::getCause
by @fwbrasil in #331 - Update zio-laws-laws, zio-prelude to 1.0.0-RC25 by @scala-steward in #336
- Update sbt to 1.10.0 by @scala-steward in #338
- Update http4s-dsl, http4s-ember-client to 0.23.27 by @scala-steward in #337
- requests: race 10k requests test by @fwbrasil in #332
- Update zio, zio-concurrent, zio-test, ... to 2.1.0 by @scala-steward in #344
- Update izumi-reflect to 2.3.9 by @scala-steward in #343
- benchs: detect runtime leaks by @fwbrasil in #345
- benchs: registry mechanism by @fwbrasil in #346
- logs: include scope information convenience methods to log values by @fwbrasil in #341
- flat check fixes by @fwbrasil in #349
- Update zio, zio-concurrent, zio-test, ... to 2.1.1 by @scala-steward in #351
- Update opentelemetry-api, ... to 1.38.0 by @scala-steward in #352
- better support for other effects in Resources by @fwbrasil in #355
- (almost) allocationless tags ⚡ by @fwbrasil in #348
- move effect command from member type to type parameter by @fwbrasil in #356
- move Tag to separate module by @fwbrasil in #357
- Update zio-laws-laws, zio-prelude to 1.0.0-RC26 by @scala-steward in #358
- Tag optimizations by @fwbrasil in #359
- direct macro refactorings by @fwbrasil in #360
- workaround to declare effects as opaque by @fwbrasil in #361
- automatically derive Flat from Tag by @fwbrasil in #366
- kyo-sttp: avoid translating Interrupted exceptions by @fwbrasil in #365
- http client race bench by @fwbrasil in #364
- scheduler: top utility by @fwbrasil in #363
- cache stream handlers by @fwbrasil in #367
- scala-js: add java-time dependency by @hearnadam in #362
- scheduler top improvements by @fwbrasil in #369
- avoid
core.eval
for error handling by @fwbrasil in #373 - avoid
lazy val
to accessKyoSttpMonad
by @fwbrasil in #371 - Reproduce #368: Stream transform test by @hearnadam in #374
- kyo-sttp: ensure backpressure by @fwbrasil in #375
- Update zio-logging, zio-logging-slf4j2 to 2.2.4 by @scala-steward in #370
- kyo-sttp: backend meter by @fwbrasil in #376
- scheduler: ensure workers stop when inactivated by @fwbrasil in #372
- kyo-benchs: migrate TestHttpServer to Vert.x by @fwbrasil in #377
- http race contention bench: use a meter to avoid overloading the http server by @fwbrasil in #381
- kyo-tag: support type unions and intersections by @fwbrasil in #378
- Update zio-http to 3.0.0-RC7 by @scala-steward in #382
- scheduler: minor optimizations by @fwbrasil in #384
- scala 3.4.2 by @fwbrasil in #385
- zios: readme by @fwbrasil in #380
- kyo-scheduler-zio by @fwbrasil in #386
- Enable choosing a
Position
with/without owning scope by @hearnadam in #387 - Update os-lib to 0.10.1 by @scala-steward in #388
New Contributors
- @calvinlfer made their first contribution in #324
Full Changelog: v0.9.3...v0.10.0
v0.9.3
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
- introduce chunks by @fwbrasil in #267
- ensure the preemption signal is dispatched to all workers by @fwbrasil in #269
- streams chunking by @fwbrasil in #270
- add: multi-platform console backed logger by @hearnadam in #272
- introduce failure benchmark by @fwbrasil in #277
- Introduce Randoms bench by @hearnadam in #279
- Enable providing custom services in KyoApp by @hearnadam in #280
- New Scheduler by @fwbrasil in #278
- improve scheduler readability by @fwbrasil in #283
- Cross compile scheduler to Scala 2.12 and 2.13 by @fwbrasil in #284
- ZIO Test Integration by @hearnadam in #282
- Log the exception in logger by @sideeffffect in #286
- Loops-based Seqs by @fwbrasil in #287
- fix: null Fiber interruption exception message by @hearnadam in #288
- add type inferred Aborts API by @hearnadam in #289
- loops review by @fwbrasil in #290
- Interop Kyo Fiber & ZIO by @hearnadam in #291
- Update zio to 2.1.0-RC3 in benchmarks by @kyri-petrou in #293
- Avoid Tags in Aborts (fixes #275) by @fwbrasil in #292
- Improve Aborts handling of sub/super types by @hearnadam in #295
- Aborts-like encoding for Sums by @fwbrasil in #297
- Aborts-like encoding for Envs by @fwbrasil in #298
- fix kyo-test build by @fwbrasil in #301
- sums readme by @fwbrasil in #300
- Aborts-like encoding for Vars by @fwbrasil in #299
- introduce fork/join benchmark by @fwbrasil in #304
- fork/join contention bench by @fwbrasil in #305
- introduce option to replace Zio's executor with Kyo's in benchmarks by @fwbrasil in #306
- fork/join contention benchmark improvement by @fwbrasil in #309
- core: reduce bytecode size by avoiding type checks by @fwbrasil in #311
- introduce Defers effect by @fwbrasil in #310
- introduce core eval method by @fwbrasil in #312
- loops: repeat and forever by @fwbrasil in #313
- fix io task runtime tracking by @fwbrasil in #314
- Initial Duration module by @hearnadam in #296
New Contributors
- @sideeffffect made their first contribution in #286
- @kyri-petrou made their first contribution in #293
Full Changelog: v0.9.2...v0.9.3