Crash when rejoining scoped Fiber
Command fails when rejoin scoped fiber. Using the following code will execute in
platform-nodeplatform-node version 0.33.2 but crashes in 0.33.3 & 0.33.4import { Command, NodeContext, Runtime } from "@effect/platform-node";
import { Effect, Fiber } from "effect";
const programScope2 = Effect.gen(function* (_) {
console.log("running programScope2");
yield* _(launchNode);
console.log("killing node");
});
const launchNode = Effect.gen(function* (_) {
const command = Command.make("geth", "--dev").pipe(
Command.start,
Effect.tap(() => console.log("started")),
Effect.fork
);
const fiber = yield* _(command);
yield* _(Effect.sleep(2000));
const process = yield* _(Fiber.join(fiber));
return { process };
}).pipe(Effect.provide(NodeContext.layer));
Runtime.runMain(programScope2);import { Command, NodeContext, Runtime } from "@effect/platform-node";
import { Effect, Fiber } from "effect";
const programScope2 = Effect.gen(function* (_) {
console.log("running programScope2");
yield* _(launchNode);
console.log("killing node");
});
const launchNode = Effect.gen(function* (_) {
const command = Command.make("geth", "--dev").pipe(
Command.start,
Effect.tap(() => console.log("started")),
Effect.fork
);
const fiber = yield* _(command);
yield* _(Effect.sleep(2000));
const process = yield* _(Fiber.join(fiber));
return { process };
}).pipe(Effect.provide(NodeContext.layer));
Runtime.runMain(programScope2);