从逻辑到工具链:对TypeScript生态系统中错误的实证研究
From Logic to Toolchains: An Empirical Study of Bugs in the TypeScript Ecosystem
AI总结:
本文通过实证研究揭示TypeScript生态系统中错误的主要来源,发现工具配置和异步处理问题占主导,同时指出静态类型虽减少传统错误,但增加了构建系统脆弱性。
摘要:
TypeScript已经迅速成为现代网络开发中流行的语言,但其对软件故障的影响仍缺乏深入理解。本文首次对现实中的TypeScript项目中的错误进行了大规模实证研究。我们分析了16个受欢迎的开源仓库中的633个错误报告,以构建错误类型的分类体系,量化其普遍性,并将其与项目特征如规模、领域和依赖组合相关联。我们的结果揭示了一幅由工具和配置错误、API误用以及异步错误处理问题主导的错误图景。我们表明,这些类别与构建复杂性和依赖异质性密切相关,表明现代故障往往出现在集成和编排边界,而非算法逻辑内部。与JavaScript研究的纵向比较显示,尽管TypeScript中的静态类型减少了传统的运行时和类型错误,但其将脆弱性转向了构建系统和工具链。这些发现为语言设计和生态系统演变如何重塑大规模软件系统的故障图谱提供了新的见解。
英文摘要:
TypeScript has rapidly become a popular language for modern web development, yet its effect on software faults remains poorly understood. This paper presents the first large-scale empirical study of bugs in real-world TypeScript projects. We analyze 633 bug reports from 16 popular open-source repositories to construct a taxonomy of fault types, quantify their prevalence, and relate them to project characteristics such as size, domain, and dependency composition. Our results reveal a fault landscape dominated not by logic or syntax errors but by tooling and configuration faults, API misuses, and asynchronous error-handling issues. We show that these categories correlate strongly with build complexity and dependency heterogeneity, indicating that modern failures often arise at integration and orchestration boundaries rather than within algorithmic logic. A longitudinal comparison with JavaScript studies shows that while static typing in TypeScript has reduced traditional runtime and type errors, it has shifted fragility toward build systems and toolchains. These findings offer new insight into how language design and ecosystem evolution reshape the fault profiles of large-scale software systems.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。