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.
翻译:现代软件开发中的依赖性管理对希望跟上最新特点和固定方法的开发者提出了许多挑战。项目维护者选择了多种、有时是相互冲突的方法来保持其依赖性。选择不适当的方法可以引入项目中的错误和脆弱性,引入突破性变化,造成不相干装置,减少依赖性易懂性,使其他人更难有效作出贡献。在本文件中,我们从经验上审查了经常出现依赖性管理问题的证据(依赖性气味),我们查看了1,146个活跃的贾瓦斯克里普储库的承付数据,以编目、量化和理解依赖性的气味。通过对从业者的一系列调查,我们发现和量化了7种不同程度受欢迎的依赖性,并调查了为什么在整个项目历史中引入了这些依赖性气味。我们的研究结果表明,依赖性气味在JavaScript项目中普遍存在两种或两种以上不同的气味,但通常会影响少数项目依赖性。我们的观察表明,依赖性气味会随着时间的流逝而增加。从业者同意,依赖性气味会引发许多问题,包括安全威胁。