microsoft / microsoft/TypeScript

Maximum call stack size exceeded

未关闭
#62,218 3 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Domain: API Needs More Info
主要语言
Go
星标
111k
派生
14.3k
平均合并
2 天 4 小时
30 天内合并 PR
132

描述

🔎 Search Terms

call stack exceeded

🕗 Version & Regression Information
  • This changed between versions 5.8.3 and 5.9.2
  • This changed in commit or PR _______
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
  • I was unable to test this on prior versions because _______
⏯ Playground Link

No response

💻 Code
// Your code here
🙁 Actual behavior

We noticed that there's a potential regression between the versions 5.8.3 and 5.9.2.

When allowing Dependabot to bump from 5.8.3 to 5.9.2, we started seeing the yarn astro check command failing with the following output:

🤟 ~/Sites/[project] (dependabot/npm_and_yarn/dev/typescript-5.9.2): yarn astro check          
19:42:18 [content] Syncing content
19:42:18 [content] Synced content
19:42:18 [types] Generated 103ms
19:42:18 [check] Getting diagnostics for Astro files in project...
Maximum call stack size exceeded
  Location:
    [project]/node_modules/typescript/lib/typescript.js:3371:46
  Stack trace:
    at String.replace (<anonymous>)
    at getCanonicalFileName ([project]/node_modules/typescript/lib/typescript.js:129084:17)
    at toPath3 ([project]/node_modules/typescript/lib/typescript.js:127606:12)
    at findSourceFile ([project]/node_modules/typescript/lib/typescript.js:128749:20)
    at findSourceFile ([project]/node_modules/typescript/lib/typescript.js:128749:20)
🙂 Expected behavior

I would expect the yarn astro check command to succeed with hopefully no type issues since nothing else was changed in the PR other than the version being bumped.

Additional information about the issue

No response

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,使用报告中的 yarn astro check 命令,在 TypeScript 5.8.3 和 5.9.2 下重现该失败。检查 node_modules/typescript/lib/typescript.js 中 stack trace 的位置,尤其是 getCanonicalFileNametoPath3findSourceFile;确定回归问题并使 check 能够在不出现 maximum call stack 错误的情况下完成,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
typescript
领域
compilers
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。