-
Notifications
You must be signed in to change notification settings - Fork 70
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
Excessive stack depth error following upgrade to v6.0 #1209
Comments
Can you share what version of TypeScript you're using here? Seems to work fine for me on a relatively complex schema with TypeScript v5.7.3 but we're always teetering on the verge on complexity so maybe there is a regressive case in a different (earlier? beta?) version of TypeScript? |
Unfortunately, we are also currently running on TypeScript v5.7.3 as well.. $ npx tsc --version
Version 5.7.3 |
@scotttrinh so you have something to try the issue on, I threw together this new basic Gel project with our current production schema. I was wrong in my comment above, it only breaks when the schema reaches a certain complexity. Let's hope we can find a solution! |
OK, that is incredibly helpful, thanks for getting a repro together! I'll try to grab some time this week to dig in a bit and see if there is some specific construct that is triggering this issue. In the meantime, you might try targeting a non-ts output style like |
No worries, it's the least I can do! I've managed to make things work by migrating a few types outside of Gel, into our headless CMS. I've also deleted old deprecated types. I've also tried using We have somewhat of a complex schema due to the fact that I've chosen to bet a lot on Gel's computed properties, especially for our invoicing / quotes / invoices modules. After having such a schema in production for a little more than a year now, maybe we've reached Gel's natural technical limitation? Anyway thank you for spending time on this, I hope it wont be too much of a bother! |
You're definitely bumping into the edges of the complexity that maybe the type-system translation that the query builder is doing between EdgeQL and TypeScript. The query builder has always been a pretty ambitious project trying to maintain the type safety for arbitrarily complex expressions 😅 Gel itself is happy with really complex schemas, though, so keep on keeping on and we'll get this patched up.
No bother at all, this is the job 👍 |
Describe the bug
When switching to Gel 6.0 and using the latest
@gel/generate
version, we get multipleExcessive stack depth comparing types ...
errors as a result oftsc
.Reproduction
Following the initialization of a new project, simply try to generate the query builder with
npx @gel/generate edgeql-js --target=ts
and opening the generated filecasting.ts
is enough to see the error on our side. Here is the result of thetsc
command.Expected behavior
It should not return any error, as things used to work fine when using older EdgeDB / Gel versions such as v5.8.
Versions
@gel/generate
version: 0.6.0The text was updated successfully, but these errors were encountered: