Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/effect/src/Fiber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import type * as Context from "./Context.ts"
import type { Effect } from "./Effect.ts"
import type { Exit } from "./Exit.ts"
import * as effect from "./internal/effect.ts"
import { version } from "./internal/version.ts"
import type { LogLevel } from "./LogLevel.ts"
import type { Pipeable } from "./Pipeable.ts"
import { hasProperty } from "./Predicate.ts"
Expand All @@ -22,7 +21,7 @@ import type { Scope } from "./Scope.ts"
import type { AnySpan } from "./Tracer.ts"
import type { Covariant } from "./Types.ts"

const TypeId = `~effect/Fiber/${version}`
const TypeId = "~effect/Fiber"

/**
* A runtime fiber is a lightweight thread that executes Effects. Fibers are
Expand Down
4 changes: 2 additions & 2 deletions packages/effect/src/TxPubSub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -638,14 +638,14 @@ export const shutdown = <A>(self: TxPubSub<A>): Effect.Effect<void> =>
* **Example** (Waiting for shutdown)
*
* ```ts
* import { Effect, TxPubSub } from "effect"
* import { Effect, Fiber, TxPubSub } from "effect"
*
* const program = Effect.gen(function*() {
* const hub = yield* TxPubSub.unbounded<number>()
*
* const fiber = yield* Effect.forkChild(TxPubSub.awaitShutdown(hub))
* yield* TxPubSub.shutdown(hub)
* yield* fiber.await
* yield* Fiber.await(fiber)
* })
* ```
*
Expand Down
14 changes: 7 additions & 7 deletions packages/effect/src/internal/effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ import {
} from "./references.ts"
import { getStackTraceLimit, setStackTraceLimit } from "./stackTraceLimit.ts"
import { addSpanStackTrace, makeStackCleaner } from "./tracer.ts"
import { version } from "./version.ts"

// ----------------------------------------------------------------------------
// Cause
Expand Down Expand Up @@ -490,7 +489,7 @@ const renderErrorCause = (cause: Error, prefix: string) => {
// ----------------------------------------------------------------------------

/** @internal */
export const FiberTypeId = `~effect/Fiber/${version}` as const
export const FiberTypeId = "~effect/Fiber" as const

const fiberVariance = {
_A: identity,
Expand Down Expand Up @@ -5204,16 +5203,17 @@ export const forkUnsafe = <FA, FE, A, E, R>(
daemon = false,
uninterruptible: boolean | "inherit" = false
): FiberImpl<A, E> => {
const interruptible = uninterruptible === "inherit" ? parent.interruptible : !uninterruptible
const child = new FiberImpl<A, E>(parent.context, interruptible)
const parentRuntime = parent as FiberImpl<FA, FE>
const interruptible = uninterruptible === "inherit" ? parentRuntime.interruptible : !uninterruptible
const child = new FiberImpl<A, E>(parentRuntime.context, interruptible)
if (immediate) {
child.evaluate(effect as any)
} else {
parent.currentDispatcher.scheduleTask(() => child.evaluate(effect as any), 0)
parentRuntime.currentDispatcher.scheduleTask(() => child.evaluate(effect as any), 0)
}
if (!daemon && !child._exit) {
parent.children().add(child)
child.addObserver(() => parent._children!.delete(child))
parentRuntime.children().add(child)
child.addObserver(() => parentRuntime._children!.delete(child))
}
return child
}
Expand Down
2 changes: 0 additions & 2 deletions packages/effect/src/internal/version.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/effect/src/unstable/cluster/Sharding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@ const make = Effect.gen(function*() {
if (!options.discard) {
const entry: ClientRequestEntry = {
rpc: rpc as any,
context: fiber.currentContext,
context: fiber.context,
message
}
clientRequests.set(id, entry)
Expand Down
9 changes: 0 additions & 9 deletions scripts/version.mjs

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/version.template.txt

This file was deleted.

Loading