Skip to content
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

JavaScript heap out of memory after upgrading to 4.3 #44299

Open
dagstuan opened this issue May 27, 2021 · 20 comments
Open

JavaScript heap out of memory after upgrading to 4.3 #44299

dagstuan opened this issue May 27, 2021 · 20 comments

Comments

@dagstuan
Copy link

@dagstuan dagstuan commented May 27, 2021

Bug Report

🔎 Search Terms

Memory

🕗 Version & Regression Information

After upgrading to 4.3.2 I get a "JavaScript heap out of memory" exception when i try to run tsc. Downgrading to 4.2.4 does not yield the same error.

<--- Last few GCs --->

[43233:0x108008000]    75872 ms: Scavenge 2043.5 (2049.9) -> 2043.0 (2049.9) MB, 6.6 / 0.0 ms  (average mu = 0.119, current mu = 0.127) allocation failure 
[43233:0x108008000]    75927 ms: Scavenge 2043.8 (2049.9) -> 2043.3 (2050.2) MB, 6.5 / 0.0 ms  (average mu = 0.119, current mu = 0.127) allocation failure 
[43233:0x108008000]    75986 ms: Scavenge 2044.0 (2050.2) -> 2043.5 (2050.4) MB, 7.0 / 0.0 ms  (average mu = 0.119, current mu = 0.127) allocation failure 


<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 0x100930c99]
Security context: 0x390dbb3008a1 <JSObject>
    1: getIntersectionType(aka getIntersectionType) [0x390df5b65bb9] [/.../node_modules/typescript/lib/tsc.js:~47588] [pc=0x1a0124246ed4](this=0x390d982804a9 <undefined>,0x390d7a08df51 <JSArray[18]>,0x390d982804a9 <undefined>,0x390d982804a9 <undefined>)
    2: getCrossProductIntersections(aka getCrossProductIntersections) [0...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0x10007e9b3 node::Abort() [/usr/local/bin/node]
 2: 0x10007eb37 node::OnFatalError(char const*, char const*) [/usr/local/bin/node]
 3: 0x100176337 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
 4: 0x1001762d3 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
 5: 0x1002fa485 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/usr/local/bin/node]
 6: 0x1002fbb54 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [/usr/local/bin/node]
 7: 0x1002f8a27 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/local/bin/node]
 8: 0x1002f6a0d v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/bin/node]
 9: 0x1002f58c1 v8::internal::Heap::HandleGCRequest() [/usr/local/bin/node]
10: 0x1002bac3f v8::internal::StackGuard::HandleInterrupts() [/usr/local/bin/node]
11: 0x1005f7b6c v8::internal::Runtime_StackGuard(int, unsigned long*, v8::internal::Isolate*) [/usr/local/bin/node]
12: 0x100930c99 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/usr/local/bin/node]
13: 0x1a0124246ed4

🙁 Actual behavior

It crashed.

🙂 Expected behavior

No crash

@adam-thomas-privitar
Copy link

@adam-thomas-privitar adam-thomas-privitar commented Jun 2, 2021

Almost (young object promotion failed Allocation failed) exact same issue. obviously must be something specific about our codebase, but verbose outputs nothing so I dont know where we go from here. Perhaps providing some kind of dump might be useful for someone?

Worth noting it happens after a very long time hanging.


<--- Last few GCs --->

[7184:0x110008000]   621386 ms: Mark-sweep (reduce) 4064.9 (4101.8) -> 4064.2 (4103.3) MB, 2424.6 / 0.0 ms  (average mu = 0.114, current mu = 0.018) allocation failure scavenge might not succeed
[7184:0x110008000]   624960 ms: Mark-sweep (reduce) 4065.3 (4102.3) -> 4064.5 (4103.5) MB, 3528.9 / 0.0 ms  (average mu = 0.056, current mu = 0.013) allocation failure scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory
 1: 0x1012d84c5 node::Abort() (.cold.1) [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
 2: 0x1000a5d59 node::Abort() [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
 3: 0x1000a5ebf node::OnFatalError(char const*, char const*) [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
 4: 0x1001e8007 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
 5: 0x1001e7fa3 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
 6: 0x100394ea5 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
 7: 0x1003f0e03 v8::internal::EvacuateNewSpaceVisitor::Visit(v8::internal::HeapObject, int) [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
 8: 0x1003d866b void v8::internal::LiveObjectVisitor::VisitBlackObjectsNoFail<v8::internal::EvacuateNewSpaceVisitor, v8::internal::MajorNonAtomicMarkingState>(v8::internal::MemoryChunk*, v8::internal::MajorNonAtomicMarkingState*, v8::internal::EvacuateNewSpaceVisitor*, v8::internal::LiveObjectVisitor::IterationMode) [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
 9: 0x1003d81b5 v8::internal::FullEvacuator::RawEvacuatePage(v8::internal::MemoryChunk*, long*) [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
10: 0x1003d7ef6 v8::internal::Evacuator::EvacuatePage(v8::internal::MemoryChunk*) [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
11: 0x1003f582e v8::internal::PageEvacuationTask::RunInParallel(v8::internal::ItemParallelJob::Task::Runner) [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
12: 0x1003af8a2 v8::internal::ItemParallelJob::Task::RunInternal() [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
13: 0x1003afd28 v8::internal::ItemParallelJob::Run() [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
14: 0x1003d9f65 void v8::internal::MarkCompactCollectorBase::CreateAndExecuteEvacuationTasks<v8::internal::FullEvacuator, v8::internal::MarkCompactCollector>(v8::internal::MarkCompactCollector*, v8::internal::ItemParallelJob*, v8::internal::MigrationObserver*, long) [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
15: 0x1003d9b66 v8::internal::MarkCompactCollector::EvacuatePagesInParallel() [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
16: 0x1003c5397 v8::internal::MarkCompactCollector::Evacuate() [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
17: 0x1003c2c2b v8::internal::MarkCompactCollector::CollectGarbage() [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
18: 0x10039556b v8::internal::Heap::MarkCompact() [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
19: 0x100391b59 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
20: 0x10038f9a0 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
21: 0x10039e08a v8::internal::Heap::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
22: 0x10039e111 v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
23: 0x10036c1e7 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
24: 0x1006eb078 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
25: 0x100a709b9 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/Users/adamthomas/.nvm/versions/node/v14.14.0/bin/node]
26: 0x2cb8704f923c ```
@brudil
Copy link

@brudil brudil commented Jun 2, 2021

We're experiencing this against both our front and backend applications which is interesting as they share little code. By any chance is anyone else here using Zod? It's perhaps the most type-complex library which we're using in both.

@adam-thomas-privitar
Copy link

@adam-thomas-privitar adam-thomas-privitar commented Jun 2, 2021

@brudil Im using Zod too!

@mudit-gupta-privitar
Copy link

@mudit-gupta-privitar mudit-gupta-privitar commented Jun 2, 2021

@brudil I am also using Zod!

@jraoult
Copy link

@jraoult jraoult commented Jun 2, 2021

Interesting, using Zod here as well, 3.1.0 and I can't compile typecheck anything anymore since TS 4.3.2

@adam-thomas-privitar
Copy link

@adam-thomas-privitar adam-thomas-privitar commented Jun 2, 2021

I setup a minimal test case like so:

import zod from 'zod'

export const SchemaExample = zod.object({
    name: zod.string().min(1),
    description: zod.string().min(1),
})
  
export type SchemaExampleType = zod.infer<typeof SchemaExample>

Interestingly, in the simple case, this causes "maximum depth" TS errors rather than a hang. I think when you have a lot of calls to zod.infer this triggers some infinite recursion/memory leak. Actually you dont need the infer even, or even the schema -- importing zod alone is enough. Not sure exactly how this might ultimately end up in hang when consumed a lot of times in a large codebase. Also not sure what changed in TS to make Zod incompatible.

Here are the errors:


node_modules/zod/lib/helpers/partialUtil.d.ts:5:42 - error TS2321: Excessive stack depth comparing types 'ZodError<?>' and 'ZodError<?>'.

5         object: T extends AnyZodObject ? ZodObject<{
                                           ~~~~~~~~~~~
6             [k in keyof T["_shape"]]: DeepPartial<T["_shape"][k]>;
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7         }, T["_unknownKeys"], T["_catchall"]> : never;
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/zod/lib/helpers/partialUtil.d.ts:5:42 - error TS2321: Excessive stack depth comparing types 'ZodFormattedError<?>' and 'ZodFormattedError<?>'.

5         object: T extends AnyZodObject ? ZodObject<{
                                           ~~~~~~~~~~~
6             [k in keyof T["_shape"]]: DeepPartial<T["_shape"][k]>;
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7         }, T["_unknownKeys"], T["_catchall"]> : never;
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/zod/lib/helpers/partialUtil.d.ts:5:42 - error TS2321: Excessive stack depth comparing types 'ZodIntersection<?, U>' and 'ZodIntersection<?, U>'.

5         object: T extends AnyZodObject ? ZodObject<{
                                           ~~~~~~~~~~~
6             [k in keyof T["_shape"]]: DeepPartial<T["_shape"][k]>;
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7         }, T["_unknownKeys"], T["_catchall"]> : never;
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/zod/lib/helpers/partialUtil.d.ts:5:42 - error TS2321: Excessive stack depth comparing types 'ZodIntersection<T, ?>' and 'ZodIntersection<T, ?>'.

5         object: T extends AnyZodObject ? ZodObject<{
                                           ~~~~~~~~~~~
6             [k in keyof T["_shape"]]: DeepPartial<T["_shape"][k]>;
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7         }, T["_unknownKeys"], T["_catchall"]> : never;
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/zod/lib/helpers/partialUtil.d.ts:5:42 - error TS2321: Excessive stack depth comparing types 'ZodNonEmptyArray<?>' and 'ZodNonEmptyArray<?>'.

5         object: T extends AnyZodObject ? ZodObject<{
                                           ~~~~~~~~~~~
6             [k in keyof T["_shape"]]: DeepPartial<T["_shape"][k]>;
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7         }, T["_unknownKeys"], T["_catchall"]> : never;
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/zod/lib/helpers/partialUtil.d.ts:5:42 - error TS2321: Excessive stack depth comparing types 'ZodOptional<?>' and 'ZodOptional<?>'.

5         object: T extends AnyZodObject ? ZodObject<{
                                           ~~~~~~~~~~~
6             [k in keyof T["_shape"]]: DeepPartial<T["_shape"][k]>;
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7         }, T["_unknownKeys"], T["_catchall"]> : never;
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/zod/lib/types.d.ts:60:168 - error TS2577: Return type annotation circularly references itself.

60     refine: <Func extends (arg: Output) => any, This extends this = this>(check: Func, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)) => ZodEffectsType<This>;
                                                                                                                                                                          ~~~~~~~~~~~~~~~~~~~~

node_modules/zod/lib/types.d.ts:61:162 - error TS2577: Return type annotation circularly references itself.

61     refinement: <This extends this = this>(check: (arg: Output) => any, refinementData: MakeErrorData | ((arg: Output, ctx: RefinementCtx) => MakeErrorData)) => ZodEffectsType<This>;
                                                                                                                                                                    ~~~~~~~~~~~~~~~~~~~~

node_modules/zod/lib/types.d.ts:62:86 - error TS2577: Return type annotation circularly references itself.

62     _refinement<This extends this>(refinement: InternalCheck<Output>["refinement"]): ZodEffectsType<This>;
                                                                                        ~~~~~~~~~~~~~~~~~~~~

node_modules/zod/lib/types.d.ts:63:90 - error TS2577: Return type annotation circularly references itself.

63     superRefine: <This extends this>(refinement: InternalCheck<Output>["refinement"]) => ZodEffectsType<This>;
                                                                                            ~~~~~~~~~~~~~~~~~~~~

node_modules/zod/lib/types.d.ts:69:68 - error TS2577: Return type annotation circularly references itself.

69     or<T extends ZodTypeAny, This extends this = this>(option: T): This extends ZodUnion<infer Opts> ? [...Opts, T] extends ZodUnionOptions ? ZodUnion<[...Opts, T]> : never : ZodUnion<[This, T]>;
                                                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/zod/lib/types.d.ts:71:97 - error TS2577: Return type annotation circularly references itself.

71     transform<NewOut, This extends this>(transform: (arg: Output) => NewOut | Promise<NewOut>): This extends ZodEffects<infer T, any> ? ZodEffects<T, NewOut> : ZodEffects<This, NewOut>;
                                                                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/zod/lib/types.d.ts:381:18 - error TS2321: Excessive stack depth comparing types 'ZodTuple<?>' and 'ZodTuple<?>'.

381 export interface ZodFunctionDef<Args extends ZodTuple<any> = ZodTuple<any>, Returns extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
                     ~~~~~~~~~~~~~~


Found 13 errors.
@dagstuan
Copy link
Author

@dagstuan dagstuan commented Jun 3, 2021

FWIW I'm not using Zod, but the codebase is quite large.

@adam-thomas-privitar
Copy link

@adam-thomas-privitar adam-thomas-privitar commented Jun 3, 2021

Interesting. Perhaps its more t do with anything that uses recursive types.

karrui added a commit to opengovsg/FormSG that referenced this issue Jun 7, 2021
zod is incompatible with Typescript 4.3.x due a change in 4.3 for evaluating deep complex types.

Since we do not use any 4.3 features (yet), lock typescript package to 4.2 until this is fixed

see microsoft/TypeScript#43249, colinhacks/zod#443, colinhacks/zod#473, microsoft/TypeScript#44299
karrui added a commit to opengovsg/FormSG that referenced this issue Jun 7, 2021
zod is incompatible with Typescript 4.3.x due a change in 4.3 for evaluating deep complex types.

Since we do not use any 4.3 features (yet), lock typescript package to 4.2 until this is fixed

see microsoft/TypeScript#43249, colinhacks/zod#443, colinhacks/zod#473, microsoft/TypeScript#44299
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 4.4.0 (Beta) milestone Jun 7, 2021
@amcasey
Copy link
Member

@amcasey amcasey commented Jun 8, 2021

I'm going to investigate Zod, since there's a repro. Hopefully, the underlying issue will turn out to be the same as @dagstuan's.

@amcasey
Copy link
Member

@amcasey amcasey commented Jun 8, 2021

Introduced in #30639 (cc @weswigham). On the bright side, in that exact commit, the toy repro runs out of memory, so we've made improvements since then. 😄

@weswigham
Copy link
Member

@weswigham weswigham commented Jun 8, 2021

Yeah, when we merged that we started exploring more types during relationship checking to test for compatibility which, for generatively expanding types, means manufacturing more types (before we hit somewhat arbitrary limiters) - in the intervening time, we've tightened up on some of those limiters/identities a bit, and that's generally how I've been going about "fixing" it - identify costly structures to compare, figure out how they're dodging our complexity limiters, and the update the complexity limiters to capture them.

@autumnblazey
Copy link

@autumnblazey autumnblazey commented Jun 10, 2021

I'm getting similar error, and I have a (maybe) simpler repro:

import { object, string } from "zod";
const validator = object({
   _key: string()
});

That's enough to trigger the excessive stack depth error. My guess is that it has something to do with generic inference.

@amcasey
Copy link
Member

@amcasey amcasey commented Jun 11, 2021

Okay, it took a while, but here's a toy repro with no imports.

export declare type ZodFormattedError<T> = T extends [any, ...any] ? {
    [K in keyof T]?: ZodFormattedError<T[K]>;
} & {
    _errors: string[];
} : T extends any[] ? ZodFormattedError<T[number]>[] & {
    _errors: string[];
} : T extends object ? {
    [K in keyof T]?: ZodFormattedError<T[K]>;
} & {
    _errors: string[];
} : {
    _errors: string[];
};
export declare class ZodError<T> {
    format: () => ZodFormattedError<T>;
}
declare const c1: ZodError<number>;
const c2: ZodError<string> = c1;

Personally, I find it easier to read like this:

type ZodFormattedError<T> = T extends [any, ...any] 
    ? { [K in keyof T]?: ZodFormattedError<T[K]>; } & { _errors: string[]; } 
    : T extends any[] 
        ? ZodFormattedError<T[number]>[] & { _errors: string[]; } 
        : T extends object 
            ? { [K in keyof T]?: ZodFormattedError<T[K]>; } & { _errors: string[]; } 
            : { _errors: string[]; };

interface ZodError<T> {
    format: () => ZodFormattedError<T>;
}
declare const c1: ZodError<number>;
const c2: ZodError<string> = c1;
@amcasey
Copy link
Member

@amcasey amcasey commented Jun 11, 2021

Ooh, if you comment out these lines, it OOMs:

type ZodFormattedError<T> = T extends [any, ...any] 
    ? { [K in keyof T]?: ZodFormattedError<T[K]>; } & { _errors: string[]; } 
    : T extends any[] 
        ? ZodFormattedError<T[number]>[] & { _errors: string[]; } 
//      : T extends object 
//          ? { [K in keyof T]?: ZodFormattedError<T[K]>; } & { _errors: string[]; } 
            : { _errors: string[]; };

interface ZodError<T> {
    format: () => ZodFormattedError<T>;
}
declare const c1: ZodError<number>;
const c2: ZodError<string> = c1;
@amcasey
Copy link
Member

@amcasey amcasey commented Jun 11, 2021

And pulling out the intersection with { _errors: string[]; } seems to mitigate the issue.

type ZodFormattedError<T> = { _errors: string[]; } & (T extends [any, ...any]
    ? { [K in keyof T]?: ZodFormattedError<T[K]>; }
    : T extends any[]
        ? ZodFormattedError<T[number]>[]
        : T extends object
            ? { [K in keyof T]?: ZodFormattedError<T[K]>; }
            : {});

(I think I got that right.)

@amcasey amcasey assigned weswigham and unassigned amcasey Jun 11, 2021
@amcasey
Copy link
Member

@amcasey amcasey commented Jun 11, 2021

@weswigham Is there something smart we can do with the depth limit in the the toy repros? And does my mitigation look correct enough to submit as a PR to zod?

@autumnblazey
Copy link

@autumnblazey autumnblazey commented Jun 11, 2021

is this a zod problem or a ts problem? I feel like this might be more of a ts problem, because something changed in ts 4.3 that broke zod

@amcasey
Copy link
Member

@amcasey amcasey commented Jun 11, 2021

@autumnblazey It's a TS problem, but a zod PR might help people until a new version of TS is released. Also, the proposed change to zod will likely make it faster even after the TS fix.

@amcasey
Copy link
Member

@amcasey amcasey commented Jun 11, 2021

@dagstuan Do you want to try running https://www.npmjs.com/package/@amcasey/ts-analyze-trace? It might identify a portion of your code (or imported package) that seems to trigger the problem and which you can share without divulging any IP.

@unional
Copy link
Contributor

@unional unional commented Jun 12, 2021

I run into the same issue with https://github.com/unional/type-plus.
Essentially similar issue with zod

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
10 participants