arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2309.02894cs.SE
收藏

Golang 生态系统中语义化版本控制的大规模实证研究

A Large-Scale Empirical Study on Semantic Versioning in Golang Ecosystem

Wenke Li, Feng Wu, Cai Fu, Fan Zhou

AI总结:

本文在 Go 生态系统中开展首个大规模实证研究,提出 GoSVI 工具检测破坏性变更并分析影响,基于 124K 库和 532K 客户端程序的数据集揭示了 SemVer 合规率、破坏性变更比例及其对下游程序的影响。

摘要:

第三方库(TPLs)已成为软件的重要组成部分,加速了开发并降低了维护成本。然而,在第三方库升级过程中经常发生破坏性变更,阻碍客户端程序向前演进。语义化版本控制(SemVer)已被用于根据兼容性来规范发布版本,但并非所有发布都遵循 SemVer 合规性。大量工作关注 Java 和 JavaScript 等生态系统中除 Golang(简称 Go)之外的 SemVer 合规性。由于缺乏检测破坏性变更的工具和 Go 的数据集,第三方库的开发者不知道是否发生了破坏性变更并影响了客户端程序,客户端程序的开发者也可能因破坏性变更而对升级依赖犹豫不决。\ 为弥合这一差距,我们在 Go 生态系统中开展了首个大规模实证研究,从破坏性变更及其影响的角度研究 SemVer 合规性。具体而言,我们提出了 GoSVI(Go Semantic Versioning Insight),通过解析客户端程序中的标识符并将其类型与破坏性变更进行比较,来检测破坏性变更并分析其影响。此外,我们收集了首个带有依赖关系图的大规模 Go 数据集,来源于 GitHub,包括 124K 个第三方库和 532K 个客户端程序。基于该数据集,我们的结果表明,86.3% 的库升级遵循 SemVer 合规性,28.6% 的非主版本升级引入了破坏性变更。此外,遵循 SemVer 的趋势随时间有所改善,从 2018 年 9 月的 63.7% 提高到 2023 年 3 月的 92.2%。最后,我们发现 33.3% 的下游客户端程序可能受到破坏性变更的影响。这些发现为第三方库的开发者和用户提供了有价值的见解,有助于做出与 SemVer 相关的决策。

英文摘要:

Third-party libraries (TPLs) have become an essential component of software, accelerating development and reducing maintenance costs. However, breaking changes often occur during the upgrades of TPLs and prevent client programs from moving forward. Semantic versioning (SemVer) has been applied to standardize the versions of releases according to compatibility, but not all releases follow SemVer compliance. Lots of work focuses on SemVer compliance in ecosystems such as Java and JavaScript beyond Golang (Go for short). Due to the lack of tools to detect breaking changes and dataset for Go, developers of TPLs do not know if breaking changes occur and affect client programs, and developers of client programs may hesitate to upgrade dependencies in terms of breaking changes. To bridge this gap, we conduct the first large-scale empirical study in the Go ecosystem to study SemVer compliance in terms of breaking changes and their impact. In detail, we purpose GoSVI (Go Semantic Versioning Insight) to detect breaking changes and analyze their impact by resolving identifiers in client programs and comparing their types with breaking changes. Moreover, we collect the first large-scale Go dataset with a dependency graph from GitHub, including 124K TPLs and 532K client programs. Based on the dataset, our results show that 86.3% of library upgrades follow SemVer compliance and 28.6% of no-major upgrades introduce breaking changes. Furthermore, the tendency to comply with SemVer has improved over time from 63.7% in 2018/09 to 92.2% in 2023/03. Finally, we find 33.3% of downstream client programs may be affected by breaking changes. These findings provide developers and users of TPLs with valuable insights to help make decisions related to SemVer.

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

↑