Type instantiation is excessively deep and possibly infinite
- EdgeDB Version: 4.0+d568f08
- EdgeDB CLI Version: EdgeDB CLI 4.0.2+be1da73
- OS Version: Linux 6.5.6-200.fc38.x86_64 (Fedora 38)
- Deno Version: deno 1.38.0 (release, x86_64-unknown-linux-gnu)
- Typescript Version: typescript 5.2.2
Steps to Reproduce:
- Try the documented tuple assignment using Deno:
const spidey = e.tuple({
name: e.str("Peter Parker"),
age: e.int64(18)
});
- Observe
Type instantiation is excessively deep and possibly infiniteerror:
Type instantiation is excessively deep and possibly infinite.deno-ts(2589)
(property) tuple: <{
name: $expr_Literal<ScalarType<"std::str", string, string, "Peter Parker">>;
age: $expr_Literal<ScalarType<"std::number", number, number, 18>>;
}>(shape: {
...;
}) => $expr_NamedTuple<...> (+3 overloads)
Schema:
Not applicable, error reproducible for literal named tuple instantiation
Cheers, thanks for your hard work, EdgeDB is awesome so far!
Very curious that it does not seem to have the same issue with non-Deno TypeScript, even with the same version of TypeScript.
A recurrent theme unfortunately. I guess edgeql-js pushes the boundaries just enough to hit some limitations of the way tsc is integrated into Deno. The weird thing is, I've tried again now with multiple tuple options, including empty tuples and those didn't trigger the error (as expected). But I'm also no longer able to reproduce so I'm wondering if this is maybe related to the way Deno does incremental compilation which they hint at in the docs.
Scrap that - seems to be happening again, not sure what's going on or how I can get it working again.
I see this when I upgrade to Typescript 5.4. Rolling back to 5.3 fixes it
Fixed in 1.5.x