API evolution on Maven Central: do developers adhere to semantic versioning?

More Info
expand_more

Abstract

In this paper, we investigate whether developers of artifacts on Maven Central adhere to semantic versioning. We also investigate whether there is a link between violations in semantic versioning and the popularity of the violating method. Developers can violate semantic versioning by removing or altering methods in their API, which we refer to as breaking changes. They can also violate semantic versioning by extending the API in a patch version, referred to as an illegal API extension. APIs that do not keep their promise of adhering to semantic versioning, will unexpectedly break their dependents during upgrading of dependencies.

We have found that these two types of violations do occur in practice. We find that 24% of analyzed artifacts contain breaking changes and 24% of artifacts contain illegal API extensions. Finally, we show that popularity of a method does not have an impact on breaking changes.

We conclude that semantic versioning can not always guarantee that upgrading dependencies will not lead to incompatibility. This indicates a need for developers to be more aware of the impact that violating semantic versioning has.