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 \textsc{Hero}, an automated technique to detect DM issues and suggest proper fixing solutions. We applied \textsc{Hero} to 19,000 popular Golang projects. The results showed that \textsc{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.
翻译:自2009年首次发行以来,Go编程语言(Golang)一直受到软件界的欢迎,其成功的一个主要原因是,以图书馆为基础的发展得到了强有力的支持,在这种发展中,戈兰项目可以通过将图书馆作为参考来方便地建立在其他项目之上。随着戈兰的演变,它建议使用新的图书馆参考模式来克服原有图书馆的局限性。虽然这两种图书馆模式都互不兼容,但都得到戈兰生态系统的支持。在戈兰项目中使用图书馆参考模式的情况各不相同,造成了许多依赖性管理(DM)问题,导致参考不一致,甚至造成失败。受这一问题的驱使,我们开展了一项经验性研究,以描述管理型项目的问题,了解其根源,并研究其确定解决方案。根据我们的调查结果,我们开发了用于发现管理型图书馆问题的自动化技术,提出适当的固定解决方案。我们对19,000个受欢迎的戈兰项目应用了textsc{Hero}。结果显示,在管理型项目中,98.5{Hero}实现了高的检测率,在管理型问题中,了解其根本原因,并研究其确定解决方案。我们报告有2,4___185}新的问题。