mirror of
https://github.com/semver/semver.git
synced 2026-07-11 03:53:53 -05:00
[PR #399] [CLOSED] Proposal for 2.1: Explicitly declare forward- and backward-compatibility #4107
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/semver/semver/pull/399
Author: @ghost
Created: 10/12/2017
Status: ❌ Closed
Base:
master← Head:master📝 Commits (4)
55dad9bOutline SemVer 2.108293b1Delete semver.svgfc46735Add Code Highlighting1f687baFix Typos📊 Changes
2 files changed (+200 additions, -984 deletions)
View changed files
📝
semver.md(+200 -156)➖
semver.svg(+0 -828)📄 Description
Taken from the proposed changes:
Don't be fooled by the new version number; while backward-compatible (of course), version
2.1fundamentally changes the way SemVer works. It is recommended that you read this documentation thoroughly.In short,
2.1lets you safely use more versions of your dependancies than2.0.0would, without breaking any code. Its implementation is the purest form of knowing exactly which versions can act as complete substitutes for any other version.2.0.0doesn't quite allow for this, because its hard cap at 3 places of version precision inherently loses information about forward and backward compatibility as more and more minor-level changes are added. As you will see,SemVer 2.1improves upon this model by explicitly declaring forward- and backward-compatibility with any other version in an easy-to-understand way.Given a hypothetical version
1.2.3:.1to the far right of the version number. In this case:1.2.3.1.1.2.4.1(but not version1.2):1.3.2.So, for example, if you used you used version
1.2of our hypothetical piece of software in your code, you know that any version beginning with "1.2" will function fully as a drop-in replacement. So, in the above examples,1.2.3,1.2.3.1and1.2.4will work, but1.3and2won't. However, the truebeauty of
SemVer 2.1lies in its granularity: because version numbers can be of arbitrary length, you are able to know exactly which versions are compatible with (theoretically infinite) precision.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.