You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect either broadcasted stream without backpressure or clear error from Effect.
What do you see instead?
tsx ./src/effect.ts
node:internal/process/promises:289
triggerUncaughtException(err, true /* fromPromise */);
^
RangeError: Invalid array length
at Function.from (<anonymous>)
at constructor (/Users/bowzee/WebstormProjects/sandbox/node_modules/effect/src/internal/pubsub.ts:371:24)
at requestedCapacity (/Users/bowzee/WebstormProjects/sandbox/node_modules/effect/src/internal/pubsub.ts:146:12)
at /Users/bowzee/WebstormProjects/sandbox/node_modules/effect/src/internal/pubsub.ts:78:21 {
name: '(FiberFailure) RangeError',
[Symbol(effect/Runtime/FiberFailure)]: Symbol(effect/Runtime/FiberFailure),
[Symbol(effect/Runtime/FiberFailure/Cause)]: {
_tag: 'Die',
defect: RangeError: Invalid array length
at Function.from (<anonymous>)
at constructor (/Users/bowzee/WebstormProjects/sandbox/node_modules/effect/src/internal/pubsub.ts:371:24)
at requestedCapacity (/Users/bowzee/WebstormProjects/sandbox/node_modules/effect/src/internal/pubsub.ts:146:12)
at EffectPrimitive.effect_instruction_i0 (/Users/bowzee/WebstormProjects/sandbox/node_modules/effect/src/internal/pubsub.ts:78:21)
at FiberRuntime.Sync (/Users/bowzee/WebstormProjects/sandbox/node_modules/effect/src/internal/fiberRuntime.ts:1076:22)
at <anonymous> (/Users/bowzee/WebstormProjects/sandbox/node_modules/effect/src/internal/fiberRuntime.ts:1308:53)
at f (/Users/bowzee/WebstormProjects/sandbox/node_modules/effect/src/internal/tracer.ts:93:19)
at runLoop (/Users/bowzee/WebstormProjects/sandbox/node_modules/effect/src/internal/fiberRuntime.ts:1298:28)
at evaluateEffect (/Users/bowzee/WebstormProjects/sandbox/node_modules/effect/src/internal/fiberRuntime.ts:891:27)
at start (/Users/bowzee/WebstormProjects/sandbox/node_modules/effect/src/internal/fiberRuntime.ts:945:14)
}
}
Node.js v21.4.0
Additional information
Just by the way – is there a way to broadcast without maximumLag? I don't need it because i'm building WS client
The text was updated successfully, but these errors were encountered:
Seems like currently there is no way to broadcast a stream without maximumLag.
I think it makes sense to borrow the experience of RxJS team, which initially have had different operators for different types of broadcasting, and it was hell to understand all of them, but in the end of the day they came to elegant solution:
share({connector: ()=>newReplaySubject(1),})
Effect could also have a share operator which would accept the abstract connector of Queue type, and users will have maximum freedom of configuration plus it is easier to understand, because you can see what's going on under the hood
What version of Effect is running?
3.1.2
What steps can reproduce the bug?
What is the expected behavior?
I expect either broadcasted stream without backpressure or clear error from Effect.
What do you see instead?
Additional information
Just by the way – is there a way to broadcast without
maximumLag
? I don't need it because i'm building WS clientThe text was updated successfully, but these errors were encountered: