Towards Better Dependency Management: A First Look at Dependency Smells in Python Projects.

Yulu Cao,Lin Chen,Wanwangying Ma,Yanhui Li,Yuming Zhou,Linzhang Wang
DOI: https://doi.org/10.1109/tse.2022.3191353
IF: 7.4
2022-01-01
IEEE Transactions on Software Engineering
Abstract:Managing cross-project dependencies is tricky in modern software development. A primary way to manage dependencies is using dependency configuration files, which brings convenience to the entire software ecosystem, including developers, maintainers, and users. However, developers may introduce dependency smells if dependency configuration files are not well written and maintained. Dependency smells are recurring violations of dependency management in dependency configuration files and can potentially lead to severe consequences. This paper provides an in-depth look at three dependency smells, namely, Missing Dependency, Bloated Dependency, and Version Constraint Inconsistency in Python projects. First, we implement a tool called Python Cross-project Dependency- PyCD to accurately extract dependency information from configuration files. The evaluation result on 212 Python projects shows that PyCD outperforms state-of-the-art tools. Then, we make an empirical study for three dependency smells in 132 Python projects to investigate the pervasiveness, causes, and evolution. The results show that: 1) dependency smells are prevalent in Python projects and exist inconsistently in different projects; 2) dependency smells are introduced into Python projects for different reasons, mainly due to the problems of synchronous update and collaborative development; and 3) dependency smells can be removed with different patterns according to different dependency smells. Furthermore, we report and get responses for 40 harmful dependency smell instances, 34 of which have been responded that these dependency smells do exist in the projects, and 10 instances are fixed or under process. The feedback from developers indicates that dependency smells can have a negative impact on project maintenance. Our study highlights that these dependency smells deserve the attention of developers.
What problem does this paper attempt to address?