Is Semantic Versioning the Right Versioning Scheme for All Applications?
If you are releasing an application/package to an external audience, especially via a package manager, Semantic Versioning (semver) is almost always the right choice.
What Is Semantic Versioning?
The semver format consists of three numbered components, written as MAJOR.MINOR.PATCH:
- MAJOR: Incremented when incompatible changes are added.
- MINOR: Incremented when new, backwards-compatible functionality is added.
- PATCH: Incremented for backward-compatible bug fixes.
For example, in version 1.2.56:
- MAJOR = 1
- MINOR = 2
- PATCH = 56
This scheme provides clarity regarding compatibility and necessary precautions during upgrades.
Why Semantic Versioning Was the Wrong Choice for Us
While semver offers significant benefits, it posed challenges for our specific use case:
- Frequent Breaking Changes:
- Incrementing the MAJOR version rapidly causes versioning fatigue.
- Delaying releases to group breaking changes increases integration testing efforts.
- Irrelevant Metadata: Our change process already tracks whether a change is breaking. We do not rely on the version number for this.
- Painful Management: Manually managing semver during rapid development was tedious and inconsistent with our need for faster releases.
- Irrelevant Metrics: For us, metrics like deployment frequency and timing were more meaningful.
Calendar Versioning (Calver): A Better Fit for Us
We adopted calendar versioning (calver) with the format YY.M.R, which simplified versioning. In this schema:
- YY: Last two digits of the year (e.g., 25 for 2025).
- M: Single-digit month number (e.g., 1 for January).
- R: Release count for the month (e.g., 3 for the third release in February).
Benefits of Calver for Our Workflow
- Automation: Version tags are automatically applied during deployment.
- Simpler Tracking: We can easily track releases per month.
- Focus on Deployment Timing: The schema prioritizes our deployment processes and internal metrics over compatibility details.
A Fresh Perspective on Semantic Versioning
As an aside, Anthony Fu recently proposed Epoch Semantic Versioning (read here), which addresses semver challenges innovatively.