绝命毒师?Maven Central中的语义版本控制和重大更改的影响
Breaking Bad? Semantic Versioning and Impact of Breaking Changes in Maven Central
摘要:
就像任何软件一样,库会不断发展,以包含新功能、错误修复、安全补丁和重构。然而,当一个库发展时,它可能会通过在其API中引入破坏性更改(Breaking Changes,BC)来打破以前与客户建立的合同。这些更改可能会在客户端代码中触发编译时、链接时或运行时错误。因此,客户端可能会犹豫是否要升级其依赖项,从而引发安全问题,并使未来的升级更加困难。了解库如何演变有助于客户端开发人员了解哪些更改以及在何处进行更改,库开发人员也可以了解这些更改可能对客户端产生的影响。在迄今为止最广泛的研究中,Raemaekers等人调查了托管在Maven Central Repository(MCR)上的Java库的开发人员在多大程度上遵循语义版本控制约定,以表明BC的引入以及这些变化如何影响客户端项目。他们的研究结果表明,BC是普遍的,而不考虑语义版本,对客户端的显着影响。在本文中,我们进行了外部和差异化的复制研究,他们的工作。我们确定并解决了原始协议的一些局限性,并将分析扩展到一个新的语料库,跨越七年的MCR。我们还提出了一种新的静态分析工具,Java字节码,Maracas,它为我们提供了:(i)两个版本的库之间的所有BC的集合;和(ii)在客户端代码中的位置的一组受个别BC的影响。我们的主要发现来自对119879个库升级和293817个客户端的分析,与最初的研究形成对比,并显示这些升级中有83.4%符合语义版本控制。此外,我们观察到,随着时间的推移,遵守语义版本化的趋势显着增加。最后,我们发现大多数BC会影响任何客户端都不使用的代码,只有7.9%的客户端受到BC的影响。这些发现应该有助于(i)图书馆开发人员理解和预测其变化的影响;(ii)图书馆用户估计图书馆升级工作并选择不太可能崩溃的图书馆;(iii)研究人员更好地理解Java中图书馆-客户共同进化的动态。
英文摘要:
Just like any software, libraries evolve to incorporate new features, bug fixes, security patches, and refactorings. However, when a library evolves, it may break the contract previously established with its clients by introducing Breaking Changes (BCs) in its API. These changes might trigger compile-time, link-time, or run-time errors in client code. As a result, clients may hesitate to upgrade their dependencies, raising security concerns and making future upgrades even more difficult.Understanding how libraries evolve helps client developers to know which changes to expect and where to expect them, and library developers to understand how they might impact their clients. In the most extensive study to date, Raemaekers et al. investigate to what extent developers of Java libraries hosted on the Maven Central Repository (MCR) follow semantic versioning conventions to signal the introduction of BCs and how these changes impact client projects. Their results suggest that BCs are widespread without regard for semantic versioning, with a significant impact on clients.In this paper, we conduct an external and differentiated replication study of their work. We identify and address some limitations of the original protocol and expand the analysis to a new corpus spanning seven more years of the MCR. We also present a novel static analysis tool for Java bytecode, Maracas, which provides us with: (i) the set of all BCs between two versions of a library; and (ii) the set of locations in client code impacted by individual BCs. Our key findings, derived from the analysis of 119, 879 library upgrades and 293, 817 clients, contrast with the original study and show that 83.4% of these upgrades do comply with semantic versioning. Furthermore, we observe that the tendency to comply with semantic versioning has significantly increased over time. Finally, we find that most BCs affect code that is not used by any client, and that only 7.9% of all clients are affected by BCs. These findings should help (i) library developers to understand and anticipate the impact of their changes; (ii) library users to estimate library upgrading effort and to pick libraries that are less likely to break; and (iii) researchers to better understand the dynamics of library-client co-evolution in Java.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。