[GH-ISSUE #681] proposal: LIBRARY version #2199

Closed
opened 2026-04-20 10:11:55 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @coldnebo on GitHub (Mar 26, 2021).
Original GitHub issue: https://github.com/semver/semver/issues/681

While looking at Rails versioning, I notice that some PATCH level changes have breaking changes now. For example:

SemVer 2.0 says:

  1. Major version X (X.y.z | X > 0) MUST be incremented if any backwards incompatible changes are introduced to the public API

If Rails followed this advice, then the logical semver increment from 5.2.4 would have to be 6.x, not 5.2.4.1. But Rails 6.x already means something bigger than an incompatible API change -- it means a group of incompatible architectural changes with the previous version.

Indeed, many gems in the ecosystem face this dilemma.

Proposal: LIBRARY version

Given a version number LIBRARY.MAJOR.MINOR.PATCH, increment the:

LIBRARY version when you make incompatible architectural changes.
MAJOR version when you make incompatible API changes,
MINOR version when you add functionality in a backwards compatible manner, and
PATCH version when you make backwards compatible bug fixes.

So, for the above example, the bump could have been: 5.3.0.0

Originally created by @coldnebo on GitHub (Mar 26, 2021). Original GitHub issue: https://github.com/semver/semver/issues/681 While looking at Rails versioning, I notice that some PATCH level changes have breaking changes now. For example: * [Update Changelog entry for 5.2.4.1 to warn of breaking changes](https://github.com/rails/rails/commit/c1ca9c7b365cdac9ccd8eb1716173ea3aef89892) SemVer 2.0 says: > 8. Major version X (X.y.z | X > 0) MUST be incremented if any backwards incompatible changes are introduced to the public API If Rails followed this advice, then the logical semver increment from 5.2.4 would have to be 6.x, not 5.2.4.1. But Rails 6.x already means something bigger than an incompatible API change -- it means a group of incompatible architectural changes with the previous version. Indeed, many gems in the ecosystem face this dilemma. ## Proposal: LIBRARY version Given a version number LIBRARY.MAJOR.MINOR.PATCH, increment the: LIBRARY version when you make incompatible architectural changes. MAJOR version when you make incompatible API changes, MINOR version when you add functionality in a backwards compatible manner, and PATCH version when you make backwards compatible bug fixes. So, for the above example, the bump could have been: 5.3.0.0
Author
Owner

@coldnebo commented on GitHub (Mar 26, 2021):

ah, sorry, I'll circle back with an RFC for this.

<!-- gh-comment-id:808524099 --> @coldnebo commented on GitHub (Mar 26, 2021): ah, sorry, I'll circle back with an RFC for this.
Author
Owner

@ljharb commented on GitHub (Mar 26, 2021):

Rails doesn’t follow semver.

<!-- gh-comment-id:808554126 --> @ljharb commented on GitHub (Mar 26, 2021): Rails doesn’t follow semver.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/semver#2199