smartPip: A Smart Approach to Resolving Python Dependency Conflict Issues
Chao Wang, Rongxin Wu, Haohao Song, Jiwu Shu, Guoqing Li
摘要
As one of the representative software ecosystems, PyPI, together with the Python package management tool pip, greatly facilitates Python developers to automatically manage the reuse of third-party libraries, thus saving development time and cost. Despite its great success in practice, a recent empirical study revealed the risks of dependency conflict (DC) issues and then summarized the characteristics of DC issues. However, the dependency resolving strategy, which is the foundation of the prior study, has evolved to a new one, namely the backtracking strategy. To understand how the evolution of this dependency resolving strategy affects the prior findings, we conducted an empirical study to revisit the characteristics of DC issues under the new strategy. Our study revealed that, of the two previously discovered DC issue manifestation patterns, one has significantly changed (Pattern A), while the other remained the same (Pattern B). We also observed, the resolving strategy for the DC issues of Pattern A suffers from the efficiency issue, while the one for the DC issues of Pattern B would lead to a waste of time and space. Based on our findings, we propose a tool smartPip to overcome the limitations of the resolving strategies. To resolve the DC issues of Pattern A, instead of iteratively verifying each candidate dependency library, we leverage a pre-built knowledge base of library dependencies to collect version constraints for concerned libraries, and then convert the version constraints into the SMT expressions for solving. To resolve the DC issues of Pattern B, we improve the existing virtual environment solution to reuse the local libraries as far as possible. Finally, we evaluated smartPip in three benchmark datasets of open source projects. The results showed that, smartPip can outperform the existing Python package management tools including pip with the new strategy and Conda in resolving DC issues of Pattern A, and achieve 1.19X - 1.60X speedups over the best baseline approach. Compared with the built-in Python virtual environment (venv), smartPip reduced 34.55% - 80.26% of storage space and achieved up to 2.26X - 6.53X speedups in resolving the DC issues of Pattern B.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Fixing dependency errors for Python build reproducibility 引用了 Watchman: monitoring dependency conflicts for Python library ecosystem
- Fixing dependency errors for Python build reproducibility 引用了 Escaping dependency hell: finding build dependency errors with the unified dependency graph
- Less is More? An Empirical Study on Configuration Issues in Python PyPI Ecosystem 引用了 Watchman: monitoring dependency conflicts for Python library ecosystem
- Less is More? An Empirical Study on Configuration Issues in Python PyPI Ecosystem 引用了 Restoring Execution Environments of Jupyter Notebooks
- Automatically Resolving Dependency-Conflict Building Failures via Behavior-Consistent Loosening of Library Version Constraints 引用了 Watchman: monitoring dependency conflicts for Python library ecosystem
- Automatically Resolving Dependency-Conflict Building Failures via Behavior-Consistent Loosening of Library Version Constraints 引用了 Fixing dependency errors for Python build reproducibility
- Automatically Resolving Dependency-Conflict Building Failures via Behavior-Consistent Loosening of Library Version Constraints 引用了 DepOwl: Detecting Dependency Bugs to Prevent Compatibility Failures
- ModuleGuard: Understanding and Detecting Module Conflicts in Python Ecosystem 引用了 Watchman: monitoring dependency conflicts for Python library ecosystem
- ModuleGuard: Understanding and Detecting Module Conflicts in Python Ecosystem 引用了 Fixing dependency errors for Python build reproducibility
- ModuleGuard: Understanding and Detecting Module Conflicts in Python Ecosystem 引用了 Restoring Execution Environments of Jupyter Notebooks
- Restoring Execution Environments of Jupyter Notebooks 引用了 Watchman: monitoring dependency conflicts for Python library ecosystem
- DepOwl: Detecting Dependency Bugs to Prevent Compatibility Failures 引用了 Watchman: monitoring dependency conflicts for Python library ecosystem
- Understanding and Remediating Open-Source License Incompatibilities in the PyPI Ecosystem 引用了 Watchman: monitoring dependency conflicts for Python library ecosystem
- How to Pet a Two-Headed Snake? Solving Cross-Repository Compatibility Issues with Hera 引用了 Watchman: monitoring dependency conflicts for Python library ecosystem
- How to Pet a Two-Headed Snake? Solving Cross-Repository Compatibility Issues with Hera 引用了 Fixing dependency errors for Python build reproducibility
- How to Pet a Two-Headed Snake? Solving Cross-Repository Compatibility Issues with Hera 引用了 Automatically Resolving Dependency-Conflict Building Failures via Behavior-Consistent Loosening of Library Version Constraints
- How to Pet a Two-Headed Snake? Solving Cross-Repository Compatibility Issues with Hera 引用了 Restoring Execution Environments of Jupyter Notebooks
- How to Pet a Two-Headed Snake? Solving Cross-Repository Compatibility Issues with Hera 引用了 DepOwl: Detecting Dependency Bugs to Prevent Compatibility Failures
引用它的顶会 Paper6
- Understanding and Remediating Open-Source License Incompatibilities in the PyPI EcosystemWeiwei Xu, Hao He, Kai Gao, Minghui ZhouASE 2023 · 13 次引用
- Automatically Resolving Dependency-Conflict Building Failures via Behavior-Consistent Loosening of Library Version ConstraintsHuiyan Wang, Shuguan Liu, Lingyu Zhang, Chang XuFSE 2023 · 8 次引用
- Less is More? An Empirical Study on Configuration Issues in Python PyPI EcosystemYun Peng, Ruida Hu, Ruoke Wang, Cuiyun Gao 等ICSE 2024 · 5 次引用
- How to Pet a Two-Headed Snake? Solving Cross-Repository Compatibility Issues with HeraYifan Xie, Zhouyang Jia, Shanshan Li, Ying Wang 等ASE 2024 · 2 次引用
- ModuleGuard: Understanding and Detecting Module Conflicts in Python EcosystemRuofan Zhu, Xingyu Wang, Chengwei Liu, Zhengzi Xu 等ICSE 2024 · 1 次引用
它引用的 Paper6
- Watchman: monitoring dependency conflicts for Python library ecosystemYing Wang, Ming Wen, Yepang Liu, Yibo Wang 等ICSE 2020 · 65 次引用
- Fixing dependency errors for Python build reproducibilitySuchita Mukherjee, Abigail Almanza, Cindy Rubio-GonzálezISSTA 2021 · 55 次引用
- Restoring Execution Environments of Jupyter NotebooksJiawei Wang, Li Li, Andreas ZellerICSE 2021 · 49 次引用
- Escaping dependency hell: finding build dependency errors with the unified dependency graphGang Fan, Chengpeng Wang, Rongxin Wu, Xiao Xiao 等ISSTA 2020 · 37 次引用
- DepOwl: Detecting Dependency Bugs to Prevent Compatibility FailuresZhouyang Jia, Shanshan Li, Tingting Yu, Chen Zeng 等ICSE 2021 · 12 次引用
相关 Paper
- Towards Understanding Third-party Library Dependency in C/C++ EcosystemWei Tang, Zhengzi Xu, Chengwei Liu, Jiahui Wu 等ASE 2022 · 64 次引用
- Bloat beneath Python's Scales: A Fine-Grained Inter-Project Dependency AnalysisGeorgios-Petros Drosos, Thodoris Sotiropoulos, Diomidis Spinellis, Dimitris MitropoulosFSE 2024 · 6 次引用
- An Empirical Study of Malicious Code In PyPI EcosystemWenbo Guo, Zhengzi Xu, Chengwei Liu, Cheng Huang 等ASE 2023 · 31 次引用
- Knowledge-Based Environment Dependency Inference for Python ProgramsHongjie Ye, Wei Chen, Wensheng Dou, Guoquan Wu 等ICSE 2022 · 21 次引用
- Conflict-aware Inference of Python Compatible Runtime Environments with Domain Knowledge GraphWei Cheng, Xiangrong Zhu, Wei HuICSE 2022 · 16 次引用
