-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
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
Running type checker produces js out of memory error #59308
Comments
We face the same issue here. |
We really need a codebase that reproduces the problem in order to investigate, unfortunately. Is anyone able to provide one? |
You can use this codebase to reproduce the issue. |
I think there were two issues posted in this PR... as part of creating a repo to aid the Typescript team the issue was found to be an edgedb issue breaking the type checker... by having the wrong operand.... export async function checkDuplicateEmailParent(email: string) {
try {
// Query the Parent table to find a user with the given email
const user = await e
.select(e.User, (user) => ({
email: true,
filter_single: e.op(user.email, "ilike", email),
}))
.run(client)
// Check if the user with the given email exists
return !!user // Return true if user exists, otherwise false
} catch (error) {
console.error("Error checking for duplicate email:", error)
throw error
}
} .. ilike should have been = I'll raise an issue with the edgedb team. closing as the original issue has been addressed. Feel free to reopen or create a new issue for the separate issue also posted in here. |
What do you mean by has been addressed ? Issue is solved ? |
I'll try to get something minimal together for this EdgeDB JS maintainer here with some context: FWIW, the structure of this type is a single function with ~350 overloads where Imagine something like this, but for 30 operators where some operators like function op<Opr1 extends TypeSet<$String>, Opr2 extends TypeSet<$String>>(
opr1: Opr1,
op: "=",
opr2: Opr2
): TypeSet<$Boolean, cardUtils.multiplyCardinalities<Opr1, Opr2>>;
function op<Opr1 extends TypeSet<$Number>, Opr2 extends TypeSet<$Number>>(
opr1: Opr1,
op: "=",
opr2: Opr2
): TypeSet<$Boolean, cardUtils.multiplyCardinalities<Opr1, Opr2>>;
function op<Opr1 extends TypeSet<$Boolean>, Opr2 extends TypeSet<$Boolean>>(
opr1: Opr1,
op: "=",
opr2: Opr2
): TypeSet<$Boolean, cardUtils.multiplyCardinalities<Opr1, Opr2>>; This worked poorly in TypeScript < 5.2, but it worked. After #54815, we started to get to a point where it was pretty easy to hit OOM or "too complex to represent" errors. I've spent a lot of time refactoring this "simple" overload-per-operator-definition into something a little closer to constant-time for the inference engine, but in the end, the inference performance has gotten worse for some other operators as a result. A longer-term solution that we're exploring is to have separate functions (still with one overload per operator definition) for each operator. |
π Search Terms
out of memory
heap limit
π Version & Regression Information
β― Playground Link
No response
π» Code
Running type checker eg
npx tsc
tsconfig
π Actual behavior
Out of memory error:
π Expected behavior
Type checker to run as expected
Additional information about the issue
Searched other issues and initially this looked similar, but out of date (version with fix is older) and details of error are not the same...
#56428
The text was updated successfully, but these errors were encountered: