一句话:通过实证研究揭示 Python 依赖冲突模式,并提出持续监控工具 Watchman,发现并协助修复大量冲突问题。
Python 项目常通过 PyPI 自动下载依赖,但版本约束容易相互冲突,导致构建失败,即依赖冲突(DC)问题。开发者缺乏诊断根因的工具。本文先对 235 个真实 DC 问题进行实证研究,总结其表现模式、修复策略,以及导致问题及其回归的关键因素。基于这些发现,作者设计并实现 Watchman,用于持续监控 PyPI 生态中的依赖冲突。评估中,Watchman 分析了 2019 年 7 月 11 日至 8 月 16 日间的 PyPI 快照,发现 117 个潜在 DC 问题并报告给相应项目;其中 63 个已确认,38 个通过作者建议的补丁快速修复。
The PyPI ecosystem has indexed millions of Python libraries to allow developers to automatically download and install dependencies of their projects based on the specified version constraints. Despite the convenience brought by automation, version constraints in Python projects can easily conflict, resulting in build failures. We refer to such conflicts as Dependency Confict (DC) issues. Although DC issues are common in Python projects, developers lack tool support to gain a comprehensive knowledge for diagnosing the root causes of these issues. In this paper, we conducted an empirical study on 235 real-world DC issues. We studied the manifestation patterns and fixing strategies of these issues and found several key factors that can lead to DC issues and their regressions. Based on our findings, we designed and implemented Watchman, a technique to continuously monitor dependency conflicts for the PyPI ecosystem. In our evaluation, Watchman analyzed PyPI snapshots between 11 Jul 2019 and 16 Aug 2019, and found 117 potential DC issues. We reported these issues to the developers of the corresponding projects. So far, 63 issues have been confirmed, 38 of which have been quickly fixed by applying our suggested patches.
@inproceedings{paperbot5569,
title = {Watchman},
author = {Ying Wang and Ming Wen and Yepang Liu and Yibo Wang and Zhenming Li and Chao Wang and Hai Yu and Shing-Chi Cheung and Chang Xu and Zhiliang Zhu},
booktitle = {ICSE},
year = {2020},
doi = {10.1145/3377811.3380426}
}