一句话:提出 LooCo,自动放宽 Python 库版本约束,在保持行为一致下解决依赖冲突构建失败
Python 项目大量复用第三方库,其版本约束常由人工配置且易出错,进而引发依赖冲突(dependency-conflict, DC)构建失败。实证研究表明这些约束可被精细化以提升构建成功率。本文提出 LooCo,自动放宽库版本约束以最大化可解解空间,同时保持库原有行为一致(behavior-consistent),从而在避免行为破坏的前提下解决冲突。在真实 Python 项目上的实验显示,LooCo 每次版本放宽约耗时 0.4 秒,平均扩展 5.5 个新版本;可将 54.8% 原本不可解的用例转为可解(即构建成功),并使原本可解用例的解平均增加 21 个。
Python projects grow quickly by code reuse and building automation based on third-party libraries. However, the version constraints associated with these libraries are prone to mal-configuration, and this forms a major obstacle to correct project building (known as dependency-conflict (DC) building failure). Our empirical findings suggest that such mal-configured version constraints were mainly prepared manually, and could essentially be refined for better quality to improve the chance of successful project building. We propose a LooCo approach to refining Python projects’ library version constraints by automatically loosening them to maximize their solutions, while keeping the libraries to observe their original behaviors. Our experimental results with real-life Python projects report that LooCo could efficiently refine library version constraints (0.4s per version loosening) by effective loosening (5.5 new versions expanded on average) automatically, and transform 54.8% originally unsolvable cases into solvable ones (i.e., successful building) and significantly increase solutions (21 more on average) for originally solvable cases.
@inproceedings{0001LZX23,
title = {Automatically Resolving Dependency-Conflict Building Failures via Behavior-Consistent Loosening of Library Version Constraints},
author = {Huiyan Wang and Shuguan Liu and Lingyu Zhang and Chang Xu},
booktitle = {FSE},
year = {2023},
doi = {10.1145/3611643.3616264}
}