We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.2.3
import { pipe } from 'effect/Function'; import * as RA from 'effect/ReadonlyArray'; const arr: number[][] = [[]]; for (let i = 0; i < 135000; i++) { arr[0].push(i); } const flattened = pipe( arr, RA.flatMap((x) => x), ); console.log(flattened.length);
135000
RangeError: Maximum call stack size exceeded at ....../node_modules/.pnpm/effect@2.2.3/node_modules/effect/dist/cjs/ReadonlyArray.js:1046:9
https://stackoverflow.com/questions/61740599/rangeerror-maximum-call-stack-size-exceeded-with-array-push
The text was updated successfully, but these errors were encountered:
Possibly also a problem in other places where spread operator is used...
Sorry, something went wrong.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply#using_apply_and_built-in_functions
I find 6 other places where this potentially also is a problem: https://github.com/search?q=repo%3AEffect-TS%2Feffect%20push(...&type=code
Successfully merging a pull request may close this issue.
What version of Effect is running?
2.2.3
What steps can reproduce the bug?
What is the expected behavior?
135000
What do you see instead?
RangeError: Maximum call stack size exceeded
at ....../node_modules/.pnpm/effect@2.2.3/node_modules/effect/dist/cjs/ReadonlyArray.js:1046:9
Additional information
https://stackoverflow.com/questions/61740599/rangeerror-maximum-call-stack-size-exceeded-with-array-push
The text was updated successfully, but these errors were encountered: