我曾依赖你,而你却击垮了我:客户端包中破坏性变更显现的实证研究
I depended on you and you broke me: An empirical study of manifesting breaking changes in client packages
AI总结:
本文实证研究 npm 生态中依赖更新引发的破坏性变更,量化其对客户端包构建的影响及恢复方式,发现非主版本更新仍会造成显著破坏。
摘要:
复杂软件系统具有由依赖关系构成的网络。开发者通常会将包管理器(例如 npm)配置为在每次发布包含缺陷修复和新功能的新版本时自动更新依赖。当某个依赖版本引入向后不兼容的变更(通常称为破坏性变更)时,依赖它的包可能无法再构建。这可能会间接影响下游包,但破坏性变更的影响以及依赖包如何从这些破坏性变更中恢复,仍不清楚。为弥补这一差距,我们调查了 npm 生态系统中破坏性变更的显现情况,重点关注包的构建受到其依赖项中破坏性变更影响的案例。我们衡量了破坏性变更对依赖包的影响程度。分析表明,在依赖项的非主版本更新期间,约 12% 的依赖包及其 14% 的版本发布受到了破坏性变更的影响。我们观察到,在所有显现的破坏性变更中,44% 同时出现在次版本和补丁版本中,而这些版本原则上应当是向后兼容的。客户端在一半情况下能够从这些破坏性变更中自行恢复,最常见的方式是升级或降级提供者的版本,而不更改包管理器中的版本配置。我们期望这些结果能帮助开发者理解此类变更的潜在影响并从中恢复。
英文摘要:
Complex software systems have a network of dependencies. Developers often configure package managers (e.g., npm) to automatically update dependencies with each publication of new releases containing bug fixes and new features. When a dependency release introduces backward-incompatible changes, commonly known as breaking changes, dependent packages may not build anymore. This may indirectly impact downstream packages, but the impact of breaking changes and how dependent packages recover from these breaking changes remain unclear. To close this gap, we investigated the manifestation of breaking changes in the npm ecosystem, focusing on cases where packages' builds are impacted by breaking changes from their dependencies. We measured the extent to which breaking changes affect dependent packages. Our analyses show that around 12% of the dependent packages and 14% of their releases were impacted by a breaking change during updates of non-major releases of their dependencies. We observed that, from all of the manifesting breaking changes, 44% were introduced both in minor and patch releases, which in principle should be backward compatible. Clients recovered themselves from these breaking changes in half of the cases, most frequently by upgrading or downgrading the provider's version without changing the versioning configuration in the package manager. We expect that these results help developers understand the potential impact of such changes and recover from them.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。