arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.15675cs.SE
收藏

依赖更新策略与包特征

Dependency Update Strategies and Package Characteristics

Abbas Javan Jafari, Diego Elias Costa, Emad Shihab, Rabe Abdalkareem

AI总结:

本文通过分析超11.2万个npm包的19个特征构建预测模型,研究依赖更新策略的选择与演变,发现依赖方数量、年龄和发布状态影响最大,且模型比npm默认策略更符合社区决策。

摘要:

管理项目依赖是软件开发中的一个关键维护问题。开发者需要选择一种更新策略,既能让他们接收重要的更新和修复,又能保护他们免受破坏性变更的影响。语义化版本控制(Semantic Versioning)被提出来解决这一困境,但许多人选择了更严格或更宽松的替代方案。这项实证研究探讨了包特征与其依赖方所选择的依赖更新策略之间的关联,以理解开发者如何选择并更改他们的更新策略。我们研究了超过112,000个npm包,并使用19个特征构建了一个预测模型,用于识别每个包的常见依赖更新策略。我们的模型相较于基线实现了至少72%的改进,并且比npm默认策略更符合社区决策。我们研究了不同包特征如何影响预测的更新策略,发现依赖方数量、年龄和发布状态是影响最大的特征。我们通过对160个包进行定性分析来补充这项工作,以研究更新策略的演变。虽然许多包的常见更新策略保持一致,但某些事件(例如1.0.0版本的发布或破坏性变更)会随时间影响所选择的更新策略。

英文摘要:

Managing project dependencies is a key maintenance issue in software development. Developers need to choose an update strategy that allows them to receive important updates and fixes while protecting them from breaking changes. Semantic Versioning was proposed to address this dilemma but many have opted for more restrictive or permissive alternatives. This empirical study explores the association between package characteristics and the dependency update strategy selected by its dependents to understand how developers select and change their update strategies. We study over 112,000 npm packages and use 19 characteristics to build a prediction model that identifies the common dependency update strategy for each package. Our model achieves a minimum improvement of 72% over the baselines and is much better aligned with community decisions than the npm default strategy. We investigate how different package characteristics can influence the predicted update strategy and find that dependent count, age and release status to be the highest influencing features. We complement the work with qualitative analyses of 160 packages to investigate the evolution of update strategies. While the common update strategy remains consistent for many packages, certain events such as the release of the 1.0.0 version or breaking changes influence the selected update strategy over time.

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

↑