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
I'm using ts-proto to generate code from pg_query.proto from libpg_query. With default options compiling the generated code causes tsc to crash due to a heap overflow. Using the --generateTrace option and @typescript/analyze-trace tool this seems to be caused by the fromPartial function for Node message. Using --ts_proto_opt=outputPartialMethods=false fixes the heap overflow.
Hi @Hilzu , if you use --ts_proto_opt=useExactTypes=false, you should be able to keep the from partial methods, but with simpler types, that won't blow up tsc.
Ideally we'd use an Exact type provided by TS: microsoft/TypeScript#12936 but for now we approximate it with a mapped/conditional type that can get expensive.
I'm using ts-proto to generate code from pg_query.proto from libpg_query. With default options compiling the generated code causes tsc to crash due to a heap overflow. Using the
--generateTrace
option and @typescript/analyze-trace tool this seems to be caused by thefromPartial
function forNode
message. Using--ts_proto_opt=outputPartialMethods=false
fixes the heap overflow.I have reproduced the issue here: https://github.com/Hilzu/ts-proto-with-pg-query#ts-proto-generated-code-causes-a-heap-overflow-with-tsc
The text was updated successfully, but these errors were encountered: