Closed mhio closed 1 year ago
I'm seeing the same issue as Fastify around "Type instatiation is excessively deep and possibly infinite". Reverting to v2.8 fixes the issue.
Thanks for the heads up! Very weird indeed as there has been no change in the source code between 2.8.2 and 2.9, only CI/CD stuff. Will be looking at that tomorrow, meanwhile feel free to stay on 2.8.2!
I was getting this same error and I had to downgrade to exactly 2.8.0 for it to work. TypeScript v5.0.4
I am using serverless framework aws-serverless-typescript template and getting the same error event 2.8.0 or 2.9.0 or even 2.7.0.
TypeScript v5.0.4
@Physicliar It was fixed in 2.8.2 I think
Just looked at it, the builds of 2.8.2 and 2.9.0 are exactly the same, except that in 2.8.2, all types are declared and not in 2.9.0.
I'm not sure why exactly, but it's probably what caused the regression (it's the only diff I see anyway). It seems it came from using the v4.9.5 of TS to build the types instead of the ^4.5.5
. Will try to fix that ASAP.
@mhio @aardvarkk @tizmagik @Physicliar Can you try with 2.9.1 ? The declare
s are now back so the code should be exactly the same as 2.8.2.
Strangely, it also solved a deno build issue (here 2.9.0 vs 2.9.1):
@ThomasAribart I can confirm that upgrading from 2.9.0 to 2.9.1 fixes the "Type instantiation is excessively deep and possibly infinite" issue for me.
Great ๐ Closing this issue then!
Thanks Thomas!
When using json-schema-to-ts via @fastify/fastify-type-provider-json-schema-to-ts the 2.9.0 release is producing issues converting schemas to types.
I only raise this issue here as 2.9.0 doesn't appear to be a feature release, just a change in the release process, so I thought a change in behaviour would be of interest here.
https://github.com/fastify/fastify-type-provider-json-schema-to-ts/issues/49
Similar to #132 but I couldn't reproduce the issue in fastify-type-provider-json-schema-to-ts depending on 2.8.0, 2.8.1 or 2.8.2 so appears on the surface to be something different.