论文标题
JavaScript项目中的依赖性气味
Dependency Smells in JavaScript Projects
论文作者
论文摘要
现代软件开发中的依赖性管理对希望保持最新功能并修复的开发人员构成了许多挑战,同时确保向后兼容。项目维护者选择了维持其依赖性的多样化,有时甚至是冲突的方法。选择不合适的方法可以在项目中引入错误和漏洞,引入破坏变化,导致无关的安装并降低依赖性理解性,从而使其他人更难有效贡献。在本文中,我们凭经验研究了反复依赖管理问题(依赖性气味)的证据。我们查看1,146个活跃JavaScript存储库数据集的提交数据,以分类,量化和理解依赖性气味。通过与从业人员的一系列调查,我们以不同程度的流行度确定并量化了七种依赖性气味,并研究了为什么在整个项目历史上都会引入它们。我们的发现表明,依赖性气味在JavaScript项目中普遍存在,其中80%的项目中出现了两个或更多不同的气味,但它们通常会感染项目的依赖性少数。我们的观察结果表明,随着时间的流逝,依赖性气味的数量往往会增加。从业者同意,依赖性气味带来了许多问题,包括安全威胁,错误,依赖性破坏,运行时错误和其他维护问题。通常会引入这些气味,因为开发人员对依赖性不当行为和NPM生态系统的缺点做出反应。
Dependency management in modern software development poses many challenges for developers who wish to stay up to date with the latest features and fixes whilst ensuring backwards compatibility. Project maintainers have opted for varied, and sometimes conflicting, approaches for maintaining their dependencies. Opting for unsuitable approaches can introduce bugs and vulnerabilities into the project, introduce breaking changes, cause extraneous installations, and reduce dependency understandability, making it harder for others to contribute effectively. In this paper, we empirically examine evidence of recurring dependency management issues (dependency smells). We look at the commit data for a dataset of 1,146 active JavaScript repositories to catalog, quantify and understand dependency smells. Through a series of surveys with practitioners, we identify and quantify seven dependency smells with varying degrees of popularity and investigate why they are introduced throughout project history. Our findings indicate that dependency smells are prevalent in JavaScript projects with two or more distinct smells appearing in 80% of the projects, but they generally infect a minority of a project's dependencies. Our observations show that the number of dependency smells tend to increase over time. Practitioners agree that dependency smells bring about many problems including security threats, bugs, dependency breakage, runtime errors, and other maintenance issues. These smells are generally introduced as developers react to dependency misbehaviour and the shortcomings of the npm ecosystem.