From 9fd7d48af9520717c85538a01afe5f957d810651 Mon Sep 17 00:00:00 2001 From: Flavio Brasil Date: Mon, 20 Jan 2025 23:25:52 -0800 Subject: [PATCH 1/8] don't cache js and native artifacts --- .github/workflows/build-main.yml | 8 ++++++-- .github/workflows/build-pr.yml | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-main.yml b/.github/workflows/build-main.yml index baea23ed7..6a414bec9 100644 --- a/.github/workflows/build-main.yml +++ b/.github/workflows/build-main.yml @@ -36,6 +36,10 @@ jobs: uses: actions/cache@v3 with: path: | - */target - **/target + */target/* + !*/target/scala-*/.*-fastopt + !*/target/scala-*/native-test/* + **/target/* + !**/target/scala-*/.*-fastopt + !**/target/scala-*/native-test/* key: ${{ runner.os }}-build-state-main \ No newline at end of file diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 60e8d3e14..8cdad3083 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -27,8 +27,12 @@ jobs: uses: actions/cache@v3 with: path: | - */target - **/target + */target/* + !*/target/scala-*/.*-fastopt + !*/target/scala-*/native-test/* + **/target/* + !**/target/scala-*/.*-fastopt + !**/target/scala-*/native-test/* key: ${{ runner.os }}-build-state-main restore-keys: | ${{ runner.os }}-build-state-main From 72fb01814c407cc6859d8e3949d6a9691b996f49 Mon Sep 17 00:00:00 2001 From: Flavio Brasil Date: Tue, 21 Jan 2025 00:01:27 -0800 Subject: [PATCH 2/8] trying to fix PR build --- .github/workflows/build-main.yml | 8 ++++---- .github/workflows/build-pr.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-main.yml b/.github/workflows/build-main.yml index 6a414bec9..ff53ba743 100644 --- a/.github/workflows/build-main.yml +++ b/.github/workflows/build-main.yml @@ -37,9 +37,9 @@ jobs: with: path: | */target/* - !*/target/scala-*/.*-fastopt - !*/target/scala-*/native-test/* + !*/*-fastopt + !*/native-test **/target/* - !**/target/scala-*/.*-fastopt - !**/target/scala-*/native-test/* + !**/*-fastopt + !**/native-test key: ${{ runner.os }}-build-state-main \ No newline at end of file diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 8cdad3083..505862eae 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -28,11 +28,11 @@ jobs: with: path: | */target/* - !*/target/scala-*/.*-fastopt - !*/target/scala-*/native-test/* + !*/*-fastopt + !*/native-test **/target/* - !**/target/scala-*/.*-fastopt - !**/target/scala-*/native-test/* + !**/*-fastopt + !**/native-test key: ${{ runner.os }}-build-state-main restore-keys: | ${{ runner.os }}-build-state-main From 749542ede037356c69ae6b77a2f91cdbd20d2d70 Mon Sep 17 00:00:00 2001 From: Flavio Brasil Date: Tue, 21 Jan 2025 00:31:17 -0800 Subject: [PATCH 3/8] disable build cache for native and js for now --- .github/workflows/build-main.yml | 8 ++++---- .github/workflows/build-pr.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-main.yml b/.github/workflows/build-main.yml index ff53ba743..4ac0f48cf 100644 --- a/.github/workflows/build-main.yml +++ b/.github/workflows/build-main.yml @@ -37,9 +37,9 @@ jobs: with: path: | */target/* - !*/*-fastopt - !*/native-test + !*/*js*/* + !*/*native*/* **/target/* - !**/*-fastopt - !**/native-test + !**/*js*/* + !**/*native*/* key: ${{ runner.os }}-build-state-main \ No newline at end of file diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 505862eae..2fa42e30c 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -28,11 +28,11 @@ jobs: with: path: | */target/* - !*/*-fastopt - !*/native-test + !*/*js*/* + !*/*native*/* **/target/* - !**/*-fastopt - !**/native-test + !**/*js*/* + !**/*native*/* key: ${{ runner.os }}-build-state-main restore-keys: | ${{ runner.os }}-build-state-main From 0f90f20cb19a63ec5557ff86af51753b65206a67 Mon Sep 17 00:00:00 2001 From: Flavio Brasil Date: Tue, 21 Jan 2025 08:51:53 -0800 Subject: [PATCH 4/8] trying coursier/cache-action instead of actions/cache to avoid PRs publishing the cache at the end --- .github/workflows/build-main.yml | 17 ++++------------- .github/workflows/build-pr.yml | 20 +++++--------------- 2 files changed, 9 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build-main.yml b/.github/workflows/build-main.yml index 4ac0f48cf..9b6a45dc2 100644 --- a/.github/workflows/build-main.yml +++ b/.github/workflows/build-main.yml @@ -15,6 +15,9 @@ jobs: steps: - uses: actions/checkout@v3.0.2 - uses: coursier/cache-action@v6 + with: + extraFiles: | + ["**/target/jvm/**"] - name: Install Dependencies run: | sudo apt-get update @@ -30,16 +33,4 @@ jobs: run: sbt '+kyoJS/test' - name: Build Native - run: sbt '+kyoNative/test' - - - name: Save build state - uses: actions/cache@v3 - with: - path: | - */target/* - !*/*js*/* - !*/*native*/* - **/target/* - !**/*js*/* - !**/*native*/* - key: ${{ runner.os }}-build-state-main \ No newline at end of file + run: sbt '+kyoNative/test' \ No newline at end of file diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 2fa42e30c..24ea82fcd 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -14,7 +14,11 @@ jobs: steps: - uses: actions/checkout@v3.0.2 - - uses: coursier/cache-action@v6 + - uses: coursier/cache-action@v6 + with: + extraFiles: | + ["**/target/jvm/**"] + extraKey: pr-${{ github.event.pull_request.number }} - name: Install Dependencies run: | sudo apt-get update @@ -23,20 +27,6 @@ jobs: with: java-version: openjdk@21.0.2=tgz+https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_linux-x64_bin.tar.gz - - name: Restore build state - uses: actions/cache@v3 - with: - path: | - */target/* - !*/*js*/* - !*/*native*/* - **/target/* - !**/*js*/* - !**/*native*/* - key: ${{ runner.os }}-build-state-main - restore-keys: | - ${{ runner.os }}-build-state-main - - name: Build JVM run: sbt '+kyoJVM/testQuick' From aa015e018d884d6e367716a774bd06468d9c6ca2 Mon Sep 17 00:00:00 2001 From: Flavio Brasil Date: Tue, 21 Jan 2025 09:23:17 -0800 Subject: [PATCH 5/8] trying coursier/cache-action instead of actions/cache --- .github/workflows/build-main.yml | 1 + .github/workflows/build-pr.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yml b/.github/workflows/build-main.yml index 9b6a45dc2..96fdc509c 100644 --- a/.github/workflows/build-main.yml +++ b/.github/workflows/build-main.yml @@ -18,6 +18,7 @@ jobs: with: extraFiles: | ["**/target/jvm/**"] + extraKey: "jvm-target" - name: Install Dependencies run: | sudo apt-get update diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 24ea82fcd..0921bbcd7 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -18,7 +18,7 @@ jobs: with: extraFiles: | ["**/target/jvm/**"] - extraKey: pr-${{ github.event.pull_request.number }} + extraKey: "jvm-target-pr-${{ github.event.pull_request.number }}" - name: Install Dependencies run: | sudo apt-get update From 32615a088e039277cfa768dff2c4a8a1d62a3e67 Mon Sep 17 00:00:00 2001 From: johnhungerford Date: Tue, 21 Jan 2025 14:37:58 -0500 Subject: [PATCH 6/8] Removed all references to Ack in docs (#1043) --- .../shared/src/main/scala/kyo/Emit.scala | 5 ++--- .../shared/src/main/scala/kyo/Poll.scala | 18 ++++++------------ 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/kyo-prelude/shared/src/main/scala/kyo/Emit.scala b/kyo-prelude/shared/src/main/scala/kyo/Emit.scala index c0e189257..2d8722b62 100644 --- a/kyo-prelude/shared/src/main/scala/kyo/Emit.scala +++ b/kyo-prelude/shared/src/main/scala/kyo/Emit.scala @@ -64,8 +64,7 @@ object Emit: * @param acc * The initial accumulator value * @param f - * The folding function that takes the current accumulator and emitted value, and returns a tuple of the new accumulator and an - * Ack to control further emissions + * The folding function that takes the current accumulator and emitted value, and returns an updated accumulator * @param v * The computation with Emit effect * @return @@ -147,7 +146,7 @@ object Emit: * @return * A tuple containing: * - Maybe[V]: The first emitted value if any (None if no values were emitted) - * - A continuation function that takes an Ack and returns the remaining computation + * - A continuation function that returns the remaining computation */ def apply[A: Flat, S](v: A < (Emit[V] & S))(using tag: Tag[Emit[V]], frame: Frame): (Maybe[V], () => A < (Emit[V] & S)) < S = ArrowEffect.handleFirst(tag, v)( diff --git a/kyo-prelude/shared/src/main/scala/kyo/Poll.scala b/kyo-prelude/shared/src/main/scala/kyo/Poll.scala index fa0e59ea5..60f8541f0 100644 --- a/kyo-prelude/shared/src/main/scala/kyo/Poll.scala +++ b/kyo-prelude/shared/src/main/scala/kyo/Poll.scala @@ -4,21 +4,16 @@ import kyo.kernel.ArrowEffect /** Represents polling values from a data source with backpressure control. * - * Poll is used to consume values while maintaining flow control through acknowledgements. Each poll operation takes an Ack that determines - * how many values can be consumed, and returns Maybe[V] indicating whether a value was available. - * - * Key behaviors: - * - Each poll operation requires an Ack value that signals the consumer's readiness to receive more data + * * Key behaviors: * - Poll returns Maybe[V], where: * - Present(v) indicates a successful poll with value v * - Absent indicates the end of the stream (no more values will be available) * - Once Absent is received, the consumer should stop polling as the stream has terminated - * - Backpressure is maintained through the Ack responses: - * - Continue signals readiness to receive more values - * - Stop indicates the consumer wants to pause receiving values + * Poll is used to consume values. Each poll operation signals readiness to receive data, and returns Maybe[V] indicating whether a value + * was available. * * The effect enables building streaming data pipelines with controlled consumption rates. Handlers can process values at their own pace by - * returning appropriate Ack responses, while respecting stream termination signals. + * polling only as needed. * * @tparam V * The type of values being polled from the data source. @@ -152,9 +147,8 @@ object Poll: /** Runs a Poll effect with a single input value, stopping after the first poll operation. * - * This method provides a single input value to the Poll effect and stops after the first poll. It returns a tuple containing: - * - An Ack value indicating whether to continue or stop - * - A continuation function that can process the Maybe[V] result of the poll + * This method provides a single input value to the Poll effect and stops after the first poll. It returns a continuation function + * that can process the Maybe[V] result of the poll * * @param v * The computation requiring Poll values From e2789ebe8a99cd955c900811cb5f892e2fe2cc1e Mon Sep 17 00:00:00 2001 From: Flavio Brasil Date: Tue, 21 Jan 2025 12:22:31 -0800 Subject: [PATCH 7/8] remove IO.unit (#1041) This method was introduced before we had the `Kyo` companion object. It doesn't make much sense since I'd expect it to return a suspended computation given the pending `IO`. --- .../scala/kyo/bench/CountdownLatchBench.scala | 2 +- .../src/main/scala/kyo/bench/DeepBindBench.scala | 2 +- .../scala/kyo/bench/EnqueueDequeueBench.scala | 2 +- .../main/scala/kyo/bench/ForkChainedBench.scala | 2 +- .../src/main/scala/kyo/bench/PingPongBench.scala | 2 +- .../main/scala/kyo/bench/RendezvousBench.scala | 2 +- .../main/scala/kyo/bench/SchedulingBench.scala | 8 ++++---- .../main/scala/kyo/bench/SemaphoreBench.scala | 2 +- kyo-core/jvm/src/main/scala/kyo/Path.scala | 2 +- kyo-core/jvm/src/main/scala/kyo/Process.scala | 2 +- kyo-core/shared/src/main/scala/kyo/IO.scala | 7 ------- .../shared/src/test/scala/kyo/ResourceTest.scala | 2 +- kyo-kernel/shared/src/main/scala/kyo/Kyo.scala | 16 +++++++++++++++- .../kyo/interop/flow/StreamSubscriber.scala | 2 +- .../kyo/interop/flow/StreamSubscription.scala | 2 +- kyo-stm/shared/src/main/scala/kyo/TTable.scala | 4 ++-- 16 files changed, 33 insertions(+), 26 deletions(-) diff --git a/kyo-bench/src/main/scala/kyo/bench/CountdownLatchBench.scala b/kyo-bench/src/main/scala/kyo/bench/CountdownLatchBench.scala index b2e11af59..646bbf7e6 100644 --- a/kyo-bench/src/main/scala/kyo/bench/CountdownLatchBench.scala +++ b/kyo-bench/src/main/scala/kyo/bench/CountdownLatchBench.scala @@ -24,7 +24,7 @@ class CountdownLatchBench extends Bench.ForkOnly(0): import kyo.* def iterate(l: Latch, n: Int): Unit < IO = - if n <= 0 then IO.unit + if n <= 0 then Kyo.unit else l.release.flatMap(_ => iterate(l, n - 1)) for diff --git a/kyo-bench/src/main/scala/kyo/bench/DeepBindBench.scala b/kyo-bench/src/main/scala/kyo/bench/DeepBindBench.scala index ca68ac881..599492259 100644 --- a/kyo-bench/src/main/scala/kyo/bench/DeepBindBench.scala +++ b/kyo-bench/src/main/scala/kyo/bench/DeepBindBench.scala @@ -8,7 +8,7 @@ class DeepBindBench extends Bench.SyncAndFork(()): import kyo.* def loop(i: Int): Unit < IO = - IO.unit.flatMap { _ => + Kyo.unit.flatMap { _ => if i > depth then () else diff --git a/kyo-bench/src/main/scala/kyo/bench/EnqueueDequeueBench.scala b/kyo-bench/src/main/scala/kyo/bench/EnqueueDequeueBench.scala index ee9908600..5d7e21395 100644 --- a/kyo-bench/src/main/scala/kyo/bench/EnqueueDequeueBench.scala +++ b/kyo-bench/src/main/scala/kyo/bench/EnqueueDequeueBench.scala @@ -24,7 +24,7 @@ class EnqueueDequeueBench extends Bench.ForkOnly(()): def loop(c: Channel[Unit], i: Int): Unit < (Async & Abort[Closed]) = if i >= depth then - IO.unit + Kyo.unit else c.put(()).flatMap(_ => c.take.flatMap(_ => loop(c, i + 1))) diff --git a/kyo-bench/src/main/scala/kyo/bench/ForkChainedBench.scala b/kyo-bench/src/main/scala/kyo/bench/ForkChainedBench.scala index ca8f29a07..a1a08fdf5 100644 --- a/kyo-bench/src/main/scala/kyo/bench/ForkChainedBench.scala +++ b/kyo-bench/src/main/scala/kyo/bench/ForkChainedBench.scala @@ -26,7 +26,7 @@ class ForkChainedBench extends Bench.ForkOnly(0): def iterate(p: Promise[Nothing, Unit], n: Int): Unit < IO = if n <= 0 then p.complete(Result.unit).unit - else IO.unit.flatMap(_ => Async.run(iterate(p, n - 1)).unit) + else Kyo.unit.flatMap(_ => Async.run(iterate(p, n - 1)).unit) for p <- Promise.init[Nothing, Unit] diff --git a/kyo-bench/src/main/scala/kyo/bench/PingPongBench.scala b/kyo-bench/src/main/scala/kyo/bench/PingPongBench.scala index 19e465fa9..ce1cb2f27 100644 --- a/kyo-bench/src/main/scala/kyo/bench/PingPongBench.scala +++ b/kyo-bench/src/main/scala/kyo/bench/PingPongBench.scala @@ -50,7 +50,7 @@ class PingPongBench extends Bench.ForkOnly(()): _ <- Async.run(chan.put(())) _ <- chan.take n <- ref.decrementAndGet - _ <- if n == 0 then promise.complete(Result.unit).unit else IO.unit + _ <- if n == 0 then promise.complete(Result.unit).unit else Kyo.unit yield () _ <- repeat(depth)(Async.run[Closed, Unit, Any](effect)) yield () diff --git a/kyo-bench/src/main/scala/kyo/bench/RendezvousBench.scala b/kyo-bench/src/main/scala/kyo/bench/RendezvousBench.scala index b8c2307a9..818c80764 100644 --- a/kyo-bench/src/main/scala/kyo/bench/RendezvousBench.scala +++ b/kyo-bench/src/main/scala/kyo/bench/RendezvousBench.scala @@ -80,7 +80,7 @@ class RendezvousBench extends Bench.ForkOnly(10000 * (10000 + 1) / 2): } } else - IO.unit + Kyo.unit def consume(waiting: AtomicRef[Any], n: Int = 0, acc: Int = 0): Int < Async = if n <= depth then diff --git a/kyo-bench/src/main/scala/kyo/bench/SchedulingBench.scala b/kyo-bench/src/main/scala/kyo/bench/SchedulingBench.scala index fa4f01783..bd9f95d48 100644 --- a/kyo-bench/src/main/scala/kyo/bench/SchedulingBench.scala +++ b/kyo-bench/src/main/scala/kyo/bench/SchedulingBench.scala @@ -30,13 +30,13 @@ class SchedulingBench extends Bench.ForkOnly(1001000): import kyo.* def fiber(i: Int): Int < IO = - IO.unit.flatMap { _ => + Kyo.unit.flatMap { _ => IO(i).flatMap { j => - IO.unit.flatMap { _ => + Kyo.unit.flatMap { _ => if j > depth then - IO.unit.flatMap(_ => IO(j)) + Kyo.unit.flatMap(_ => IO(j)) else - IO.unit.flatMap(_ => fiber(j + 1)) + Kyo.unit.flatMap(_ => fiber(j + 1)) } } } diff --git a/kyo-bench/src/main/scala/kyo/bench/SemaphoreBench.scala b/kyo-bench/src/main/scala/kyo/bench/SemaphoreBench.scala index d16c6458a..06b32d787 100644 --- a/kyo-bench/src/main/scala/kyo/bench/SemaphoreBench.scala +++ b/kyo-bench/src/main/scala/kyo/bench/SemaphoreBench.scala @@ -24,7 +24,7 @@ class SemaphoreBench extends Bench.ForkOnly(()): def loop(s: Meter, i: Int): Unit < (Async & Abort[Closed]) = if i >= depth then - IO.unit + Kyo.unit else s.run(()).flatMap(_ => loop(s, i + 1)) diff --git a/kyo-core/jvm/src/main/scala/kyo/Path.scala b/kyo-core/jvm/src/main/scala/kyo/Path.scala index 28625f1af..779e37f05 100644 --- a/kyo-core/jvm/src/main/scala/kyo/Path.scala +++ b/kyo-core/jvm/src/main/scala/kyo/Path.scala @@ -283,7 +283,7 @@ class Path private (val path: List[String]) derives CanEqual: (parentExists, createFolders) match case (true, _) => IO(JFiles.copy(toJava, to.toJava, opts*)).unit case (false, true) => Path(toJava.getParent().toString).mkDir.andThen(IO(JFiles.copy(toJava, to.toJava, opts*)).unit) - case _ => IO.unit + case _ => () } end copy diff --git a/kyo-core/jvm/src/main/scala/kyo/Process.scala b/kyo-core/jvm/src/main/scala/kyo/Process.scala index 194f3e039..88a33b546 100644 --- a/kyo-core/jvm/src/main/scala/kyo/Process.scala +++ b/kyo-core/jvm/src/main/scala/kyo/Process.scala @@ -192,7 +192,7 @@ object Process: for _ <- Async.run(Resource.run(resources)) yield () - case _ => IO.unit + case _ => Kyo.unit yield process override def cwd(newCwd: Path) = self.copy(cwd = Some(newCwd)) diff --git a/kyo-core/shared/src/main/scala/kyo/IO.scala b/kyo-core/shared/src/main/scala/kyo/IO.scala index 71476369e..560a66eec 100644 --- a/kyo-core/shared/src/main/scala/kyo/IO.scala +++ b/kyo-core/shared/src/main/scala/kyo/IO.scala @@ -24,13 +24,6 @@ opaque type IO <: Abort[Nothing] = Abort[Nothing] object IO: - /** Creates a unit IO effect, representing a no-op side effect. - * - * @return - * A unit value wrapped in an IO effect. - */ - inline def unit: Unit < IO = () - /** Suspends a potentially side-effecting computation in an IO effect. * * This method allows you to lift any computation (including those with side effects) into the IO context, deferring its execution diff --git a/kyo-core/shared/src/test/scala/kyo/ResourceTest.scala b/kyo-core/shared/src/test/scala/kyo/ResourceTest.scala index 3f9962947..cb5613900 100644 --- a/kyo-core/shared/src/test/scala/kyo/ResourceTest.scala +++ b/kyo-core/shared/src/test/scala/kyo/ResourceTest.scala @@ -201,7 +201,7 @@ class ResourceTest extends Test: case object TestException extends NoStackTrace "acquire fails" taggedAs jvmOnly in run { - val io = Resource.acquireRelease(IO[Int, Any](throw TestException))(_ => IO.unit) + val io = Resource.acquireRelease(IO[Int, Any](throw TestException))(_ => Kyo.unit) Resource.run(io) .pipe(Async.runAndBlock(timeout)) .pipe(Abort.run(_)) diff --git a/kyo-kernel/shared/src/main/scala/kyo/Kyo.scala b/kyo-kernel/shared/src/main/scala/kyo/Kyo.scala index 28d4dd1c4..a7097d8c5 100644 --- a/kyo-kernel/shared/src/main/scala/kyo/Kyo.scala +++ b/kyo-kernel/shared/src/main/scala/kyo/Kyo.scala @@ -12,6 +12,8 @@ object Kyo: * While pure values are automatically lifted into Kyo computations in most cases, this method can be useful in specific scenarios, * such as in if/else expressions, to help with type inference. * + * Note: This is a zero-cost operation that simply wraps the value in a Kyo computation type without introducing any effect suspension. + * * @tparam A * The type of the value * @tparam S @@ -19,10 +21,22 @@ object Kyo: * @param v * The value to lift into the effect context * @return - * A computation that produces the given value + * A computation that directly produces the given value without suspension */ inline def pure[A, S](inline v: A): A < S = v + /** Returns a pure effect that produces Unit. + * + * This is exactly equivalent to `pure(())`, as both simply lift the Unit value into the effect context without introducing any effect + * suspension. + * + * @tparam S + * The effect context (can be Any) + * @return + * A computation that directly produces Unit without suspension + */ + inline def unit[S]: Unit < S = () + /** Zips two effects into a tuple. * * @param v1 diff --git a/kyo-reactive-streams/shared/src/main/scala/kyo/interop/flow/StreamSubscriber.scala b/kyo-reactive-streams/shared/src/main/scala/kyo/interop/flow/StreamSubscriber.scala index 20eb14636..b765e69c5 100644 --- a/kyo-reactive-streams/shared/src/main/scala/kyo/interop/flow/StreamSubscriber.scala +++ b/kyo-reactive-streams/shared/src/main/scala/kyo/interop/flow/StreamSubscriber.scala @@ -235,7 +235,7 @@ final private[kyo] class StreamSubscriber[V]( end if case other => if state.compareAndSet(curState, other) then - IO.unit + Kyo.unit else handleInterupt() end match diff --git a/kyo-reactive-streams/shared/src/main/scala/kyo/interop/flow/StreamSubscription.scala b/kyo-reactive-streams/shared/src/main/scala/kyo/interop/flow/StreamSubscription.scala index a2283c132..690ba4289 100644 --- a/kyo-reactive-streams/shared/src/main/scala/kyo/interop/flow/StreamSubscription.scala +++ b/kyo-reactive-streams/shared/src/main/scala/kyo/interop/flow/StreamSubscription.scala @@ -74,7 +74,7 @@ final private[kyo] class StreamSubscription[V, Ctx]( fiber.onComplete { case Result.Success(StreamComplete) => IO(subscriber.onComplete()) case Result.Panic(e) => IO(subscriber.onError(e)) - case Result.Failure(StreamCanceled) => IO.unit + case Result.Failure(StreamCanceled) => Kyo.unit }.andThen(fiber) } end consume diff --git a/kyo-stm/shared/src/main/scala/kyo/TTable.scala b/kyo-stm/shared/src/main/scala/kyo/TTable.scala index 715114134..93059486a 100644 --- a/kyo-stm/shared/src/main/scala/kyo/TTable.scala +++ b/kyo-stm/shared/src/main/scala/kyo/TTable.scala @@ -187,7 +187,7 @@ object TTable: removeFromIndexes(id, prev.get) .andThen(updateIndexes(id, record)) else - Kyo.pure(()) + Kyo.unit yield prev def upsert(id: Id, record: Record[Fields])(using Frame) = @@ -197,7 +197,7 @@ object TTable: for record <- store.get(id) deleted <- store.remove(id) - _ <- if deleted.nonEmpty then removeFromIndexes(id, record.get) else Kyo.pure(()) + _ <- if deleted.nonEmpty then removeFromIndexes(id, record.get) else Kyo.unit yield deleted def size(using Frame) = store.size From de308a36528597e1ae2c87a72d037065de85f436 Mon Sep 17 00:00:00 2001 From: Flavio Brasil Date: Tue, 21 Jan 2025 12:56:41 -0800 Subject: [PATCH 8/8] remove build cache to see if the build stabilizes again --- .github/workflows/build-main.yml | 4 ---- .github/workflows/build-pr.yml | 4 ---- 2 files changed, 8 deletions(-) diff --git a/.github/workflows/build-main.yml b/.github/workflows/build-main.yml index 96fdc509c..a3809013d 100644 --- a/.github/workflows/build-main.yml +++ b/.github/workflows/build-main.yml @@ -15,10 +15,6 @@ jobs: steps: - uses: actions/checkout@v3.0.2 - uses: coursier/cache-action@v6 - with: - extraFiles: | - ["**/target/jvm/**"] - extraKey: "jvm-target" - name: Install Dependencies run: | sudo apt-get update diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 0921bbcd7..f8c53dca0 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -15,10 +15,6 @@ jobs: steps: - uses: actions/checkout@v3.0.2 - uses: coursier/cache-action@v6 - with: - extraFiles: | - ["**/target/jvm/**"] - extraKey: "jvm-target-pr-${{ github.event.pull_request.number }}" - name: Install Dependencies run: | sudo apt-get update