一句话:通过实证研究刻画 Go 依赖管理问题,并提出自动检测与修复建议工具 Hero。
Go 语言支持基于库的开发,但随着演化出现了 PATH 与 Modules 两种不兼容的库引用模式,二者在生态中混用导致大量依赖管理(DM)问题,如引用不一致甚至构建失败。本文首先开展实证研究,刻画这些 DM 问题的表现、根因与修复方式;进而提出自动化技术 Hero,用于检测 DM 问题并给出合适的修复建议。作者将 Hero 应用于 19,000 个流行 Go 项目,在 DM 问题基准上达到 98.5% 的检测率,并在 2,356 个项目中发现 2,422 个新 DM 问题;报告 280 个问题,其中 181 个(64.6%)被确认,160 个(88.4%)已修复或正在修复,且几乎所有修复都采纳了 Hero 的建议。
Ever since its first release in 2009, the Go programming language (Golang) has been well received by software communities. A major reason for its success is the powerful support of library-based development, where a Golang project can be conveniently built on top of other projects by referencing them as libraries. As Golang evolves, it recommends the use of a new library-referencing mode to overcome the limitations of the original one. While these two library modes are incompatible, both are supported by the Golang ecosystem. The heterogeneous use of library-referencing modes across Golang projects has caused numerous dependency management (DM) issues, incurring reference inconsistencies and even build failures. Motivated by the problem, we conducted an empirical study to characterize the DM issues, understand their root causes, and examine their fixing solutions. Based on our findings, we developed Hero, an automated technique to detect DM issues and suggest proper fixing solutions. We applied Hero to 19,000 popular Golang projects. The results showed that Hero achieved a high detection rate of 98.5% on a DM issue benchmark and found 2,422 new DM issues in 2,356 popular Golang projects. We reported 280 issues, among which 181 (64.6%) issues have been confirmed, and 160 of them (88.4%) have been fixed or are under fixing. Almost all the fixes have adopted our fixing suggestions.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{abs-2102-12105,
title = {Hero: On the Chaos When PATH Meets Modules},
author = {Ying Wang and Liang Qiao and Chang Xu and Yepang Liu and Shing-Chi Cheung and Na Meng and Hai Yu and Zhiliang Zhu},
booktitle = {ICSE},
year = {2021},
doi = {10.1109/icse43902.2021.00022}
}