arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2001.07808cs.SE
收藏

Maven生态系统中臃肿依赖的综合研究

A Comprehensive Study of Bloated Dependencies in the Maven Ecosystem

César Soto-Valero, Nicolas Harrand, Martin Monperrus, Benoit Baudry

AI总结:

本研究针对Maven生态的臃肿依赖问题,提出DepClean工具分析依赖,发现75.1%的依赖为臃肿依赖,且开源开发者普遍愿意接受移除臃肿依赖的拉取请求。

摘要:

构建自动化工具和包管理器对软件开发有着深远影响。它们促进了第三方库的复用,支持应用代码与其外部依赖之间的清晰分离,并能自动化多项软件开发任务。然而,这些工具的广泛采用也带来了与依赖管理相关的新挑战。在本文中,我们针对其中一项挑战——臃肿依赖的出现——开展了一项原创研究。\n 臃肿依赖是指构建工具随应用编译代码一同打包,但实际上对构建和运行应用而言并非必需的库。这种现象会人为增大构建后二进制文件的体积,并增加维护工作量。我们提出了一款名为DepClean的工具,用于分析Maven制品中臃肿依赖的存在情况。我们分析了托管在Maven Central上的9639个Java制品,这些制品共包含723444条依赖关系。我们的核心研究结果是,被分析的依赖关系中有75.1%属于臃肿依赖。换言之,将Maven制品的依赖数量减少至当前数量的1/4是可行的。我们还针对30个知名开源项目开展了定性研究。研究结果表明,开发者会关注自身的依赖情况,并且愿意移除臃肿依赖:在得到回复的21个拉取请求中,有18个被开发者接受并合并,总共移除了131个依赖。

英文摘要:

Build automation tools and package managers have a profound influence on software development. They facilitate the reuse of third-party libraries, support a clear separation between the application's code and its external dependencies, and automate several software development tasks. However, the wide adoption of these tools introduces new challenges related to dependency management. In this paper, we propose an original study of one such challenge: the emergence of bloated dependencies. Bloated dependencies are libraries that the build tool packages with the application's compiled code but that are actually not necessary to build and run the application. This phenomenon artificially grows the size of the built binary and increases maintenance effort. We propose a tool, called DepClean, to analyze the presence of bloated dependencies in Maven artifacts. We analyze 9,639 Java artifacts hosted on Maven Central, which include a total of 723,444 dependency relationships. Our key result is that 75.1% of the analyzed dependency relationships are bloated. In other words, it is feasible to reduce the number of dependencies of Maven artifacts up to 1/4 of its current count. We also perform a qualitative study with 30 notable open-source projects. Our results indicate that developers pay attention to their dependencies and are willing to remove bloated dependencies: 18/21 answered pull requests were accepted and merged by developers, removing 131 dependencies in total.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑