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
Using the latest version of edgedb and @edgedb/generate, I upgraded to latest version of Typescript (5.4.5) and started getting an error all over my code. Downgrading Typescript fixes the problem.
Thanks for the report. e.op is particularly susceptible to type performance issues and 5.4 recently made things worse. I've done a bunch of work to mitigate it for some things, but e.op continues to be right on the edge. like is especially expensive due to how the overloads work since it's at the end of the list of overloads for e.op 😮💨
I'll keep this open while we continue to work on improving this incrementally, and we have some larger refactors coming soon that will hopefully make a much more meaningful impact on type performance.
One specific suggestion for your case:
I would consider using a mix of the queries generator for static queries like this with the query builder for more dynamic queries. The types for the queries generator are totally flat and have optimal performance compared to the more complex types in the query builder.
withprefix:=<str>$prefix,
year :=<str>$year,
search_term :=prefix++ year ++"-%",
select WorkingDocument { no }
filter .no like search_term;
Thanks for your reponse and your incredible work on EdgeDB Typescript client! It's great to hear about the upcoming improvements and refactors. Using the queries generator for static queries and the query builder for dynamic ones will work fine for now :)
Using the latest version of edgedb and @edgedb/generate, I upgraded to latest version of Typescript (5.4.5) and started getting an error all over my code. Downgrading Typescript fixes the problem.
Code
Schema
Error or desired behavior
error TS2321: Excessive stack depth comparing types 'getSharedParentPrimitive<P1["element"]["element"], P2["element"]["element"]>' and 'BaseType'.
Versions:
2.0
): 4.7+45e4acc2.0
): EdgeDB CLI 4.0.0-alpha.1+ddfbe70edgedb-js
version (e.g.0.20.10
;): 1.5.3@edgedb/generate
version (e.g.0.0.7
;): 0.5.3The text was updated successfully, but these errors were encountered: