samchon / typia

Super-fast/easy runtime validators and serializers via transformation
https://typia.io/
MIT License
4.47k stars 154 forks source link

RangeError: Maximum call stack size exceeded #637

Closed sacru2red closed 1 year ago

sacru2red commented 1 year ago

When run @nestia/sdk's sdk or swagger typia throws error

RangeError: Maximum call stack size exceeded
    at Object.createBaseTokenNode (C:\Users\.....project.....\node_modules\typescript\lib\typescript.js:27792:39)

error occurred here link

for (const object of collection.objects())
    object.recursive = object.properties.some((prop) =>
    isRecursive(object.name)(prop.value),
);

유저인 제가 보기에는 좀 더 에러 핸들링을 하면 낫지 않을까 싶습니다. 그냥 버전올리고, 평소대로 sdk, swagger를 generate 하다보면 에러를 내는 경우들이 있더라고요. 왜 인지 찾고찾다보니 typia에서 에러를 낸다는 것을 알았습니다. 일단 try .. catch 로 감싸는 패치를 만들어서 돌아는가게 사용중입니다.

sacru2red commented 1 year ago

https://github.com/sacru2red/typia-maximum-call-stack 레포를 만들고 @samchon 님을 초대했습니다. 이래저래 공개되지 않아야 하는 정보가 있을 것 같아서요.

samchon commented 1 year ago

Looking at your DTO, you're using unnamed declaration.

Change Record.vital to have exact interface declaration, and also UpserRecordControllerDto.record.

sacru2red commented 1 year ago

어.. 잘못 commit한 상태였던 것 같은데 어떻게 보셨지..

sacru2red commented 1 year ago

So.. wouldn't it be better to have typia throw an error saying "You are using an unnamed declaration."

..Thanks!!