{"id":2455,"date":"2017-05-15T20:19:39","date_gmt":"2017-05-15T18:19:39","guid":{"rendered":"http:\/\/monodes.com\/predaelli\/?p=2455"},"modified":"2017-05-15T10:48:48","modified_gmt":"2017-05-15T08:48:48","slug":"2455","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2017\/05\/15\/2455\/","title":{"rendered":""},"content":{"rendered":"<p><em><a href=\"http:\/\/semver.org\/\">Semantic Versioning 2.0.0 | Semantic Versioning<\/a><\/em><\/p>\n<p>Software versioning labels, the right way&#8230; \ud83d\ude42<\/p>\n<p><!--more--><!--nextpage--><\/p>\n<blockquote>\n<h1 id=\"semantic-versioning-200\">Semantic Versioning 2.0.0<\/h1>\n<h2 id=\"summary\">Summary<\/h2>\n<p>Given a version number MAJOR.MINOR.PATCH, increment the:<\/p>\n<ol>\n<li>MAJOR version when you make incompatible API changes,<\/li>\n<li>MINOR version when you add functionality in a backwards-compatible manner, and<\/li>\n<li>PATCH version when you make backwards-compatible bug fixes.<\/li>\n<\/ol>\n<p>Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.<\/p>\n<h2 id=\"introduction\">Introduction<\/h2>\n<p>In the world of software management there exists a dread place called \u201cdependency hell.\u201d The bigger your system grows and the more packages you integrate into your software, the more likely you are to find yourself, one day, in this pit of despair.<\/p>\n<p>In systems with many dependencies, releasing new package versions can quickly become a nightmare. If the dependency specifications are too tight, you are in danger of version lock (the inability to upgrade a package without having to release new versions of every dependent package). If dependencies are specified too loosely, you will inevitably be bitten by version promiscuity (assuming compatibility with more future versions than is reasonable). Dependency hell is where you are when version lock and\/or version promiscuity prevent you from easily and safely moving your project forward.<\/p>\n<p>As a solution to this problem, I propose a simple set of rules and requirements that dictate how version numbers are assigned and incremented. These rules are based on but not necessarily limited to pre-existing widespread common practices in use in both closed and open-source software. For this system to work, you first need to declare a public API. This may consist of documentation or be enforced by the code itself. Regardless, it is important that this API be clear and precise. Once you identify your public API, you communicate changes to it with specific increments to your version number. Consider a version format of X.Y.Z (Major.Minor.Patch). Bug fixes not affecting the API increment the patch version, backwards compatible API additions\/changes increment the minor version, and backwards incompatible API changes increment the major version.<\/p>\n<p>I call this system \u201cSemantic Versioning.\u201d Under this scheme, version numbers and the way they change convey meaning about the underlying code and what has been modified from one version to the next.<\/p>\n<h2 id=\"semantic-versioning-specification-semver\">Semantic Versioning Specification (SemVer)<\/h2>\n<p>The key words \u201cMUST\u201d, \u201cMUST NOT\u201d, \u201cREQUIRED\u201d, \u201cSHALL\u201d, \u201cSHALL NOT\u201d, \u201cSHOULD\u201d, \u201cSHOULD NOT\u201d, \u201cRECOMMENDED\u201d, \u201cMAY\u201d, and \u201cOPTIONAL\u201d in this document are to be interpreted as described in <a href=\"http:\/\/tools.ietf.org\/html\/rfc2119\">RFC 2119<\/a>.<\/p>\n<ol>\n<li id=\"spec-item-1\">Software using Semantic Versioning MUST declare a public API. This API could be declared in the code itself or exist strictly in documentation. However it is done, it should be precise and comprehensive.<\/li>\n<li id=\"spec-item-2\">A normal version number MUST take the form X.Y.Z where X, Y, and Z are non-negative integers, and MUST NOT contain leading zeroes. X is the major version, Y is the minor version, and Z is the patch version. Each element MUST increase numerically. For instance: 1.9.0 -&gt; 1.10.0 -&gt; 1.11.0.<\/li>\n<li id=\"spec-item-3\">Once a versioned package has been released, the contents of that version MUST NOT be modified. Any modifications MUST be released as a new version.<\/li>\n<li id=\"spec-item-4\">Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.<\/li>\n<li id=\"spec-item-5\">Version 1.0.0 defines the public API. The way in which the version number is incremented after this release is dependent on this public API and how it changes.<\/li>\n<li id=\"spec-item-6\">Patch version Z (x.y.Z | x &gt; 0) MUST be incremented if only backwards compatible bug fixes are introduced. A bug fix is defined as an internal change that fixes incorrect behavior.<\/li>\n<li id=\"spec-item-7\">Minor version Y (x.Y.z | x &gt; 0) MUST be incremented if new, backwards compatible functionality is introduced to the public API. It MUST be incremented if any public API functionality is marked as deprecated. It MAY be incremented if substantial new functionality or improvements are introduced within the private code. It MAY include patch level changes. Patch version MUST be reset to 0 when minor version is incremented.<\/li>\n<li id=\"spec-item-8\">Major version X (X.y.z | X &gt; 0) MUST be incremented if any backwards incompatible changes are introduced to the public API. It MAY include minor and patch level changes. Patch and minor version MUST be reset to 0 when major version is incremented.<\/li>\n<li id=\"spec-item-9\">A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version. Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. Numeric identifiers MUST NOT include leading zeroes. Pre-release versions have a lower precedence than the associated normal version. A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version. Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92.<\/li>\n<li id=\"spec-item-10\">Build metadata MAY be denoted by appending a plus sign and a series of dot separated identifiers immediately following the patch or pre-release version. Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. Build metadata SHOULD be ignored when determining version precedence. Thus two versions that differ only in the build metadata, have the same precedence. Examples: 1.0.0-alpha+001, 1.0.0+20130313144700, 1.0.0-beta+exp.sha.5114f85.<\/li>\n<li id=\"spec-item-11\">Precedence refers to how versions are compared to each other when ordered. Precedence MUST be calculated by separating the version into major, minor, patch and pre-release identifiers in that order (Build metadata does not figure into precedence). Precedence is determined by the first difference when comparing each of these identifiers from left to right as follows: Major, minor, and patch versions are always compared numerically. Example: 1.0.0 &lt; 2.0.0 &lt; 2.1.0 &lt; 2.1.1. When major, minor, and patch are equal, a pre-release version has lower precedence than a normal version. Example: 1.0.0-alpha &lt; 1.0.0. Precedence for two pre-release versions with the same major, minor, and patch version MUST be determined by comparing each dot separated identifier from left to right until a difference is found as follows: identifiers consisting of only digits are compared numerically and identifiers with letters or hyphens are compared lexically in ASCII sort order. Numeric identifiers always have lower precedence than non-numeric identifiers. A larger set of pre-release fields has a higher precedence than a smaller set, if all of the preceding identifiers are equal. Example: 1.0.0-alpha &lt; 1.0.0-alpha.1 &lt; 1.0.0-alpha.beta &lt; 1.0.0-beta &lt; 1.0.0-beta.2 &lt; 1.0.0-beta.11 &lt; 1.0.0-rc.1 &lt; 1.0.0.<\/li>\n<\/ol>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">Semantic Versioning 2.0.0 | Semantic Versioning Software versioning labels, the right way&#8230; \ud83d\ude42<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2017\/05\/15\/2455\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"link","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[72],"tags":[159],"class_list":["post-2455","post","type-post","status-publish","format-link","hentry","category-documentations","tag-best-practise","post_format-post-format-link"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/s6daft-2455","jetpack-related-posts":[{"id":839,"url":"https:\/\/monodes.com\/predaelli\/2015\/12\/09\/does-debian-dislike-agpl\/","url_meta":{"origin":2455,"position":0},"title":"Does Debian dislike AGPL?","author":"Paolo Redaelli","date":"2015-12-09","format":false,"excerpt":"Today I was going to compile dash cryptcoin from the sources. Debian ships Berkeley DB version 5.3 by default so the configure script of dash argued that it likes version 4.8 for portability reasons. Too bad that current Debian version don't ship 4.8 anymore. What's worse thought is that 4.8\u2026","rel":"","context":"In &quot;Debian&quot;","block_context":{"text":"Debian","link":"https:\/\/monodes.com\/predaelli\/category\/debian\/"},"img":{"alt_text":"berkeleydb","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2015\/12\/berkeleydb.gif?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":11192,"url":"https:\/\/monodes.com\/predaelli\/2024\/01\/14\/press-this-needs-an-update\/","url_meta":{"origin":2455,"position":1},"title":"&#8220;Press This&#8221; needs an update","author":"Paolo Redaelli","date":"2024-01-14","format":false,"excerpt":"This plugin hasn\u2019t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress. Download Press This By WordPress Contributors From https:\/\/wordpress.org\/plugins\/press-this\/ As I use it a lot, I think\u2026","rel":"","context":"In &quot;Mood&quot;","block_context":{"text":"Mood","link":"https:\/\/monodes.com\/predaelli\/category\/mood\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5026,"url":"https:\/\/monodes.com\/predaelli\/2018\/12\/10\/exploiting-developer-infrastructure-is-ridiculously-easy\/","url_meta":{"origin":2455,"position":2},"title":"Exploiting Developer Infrastructure Is Ridiculously Easy","author":"Paolo Redaelli","date":"2018-12-10","format":false,"excerpt":"The open-source ecosystem is broken Source: Exploiting Developer Infrastructure Is Ridiculously Easy That's why Debian has its own repositories. Exploiting Developer Infrastructure Is Ridiculously Easy The open-source ecosystem is broken Jarrod Overson Nov 27 Photo: Charles Deluvio\/Unsplash In late October, an issue was opened on an extremely popular node.js tool,\u2026","rel":"","context":"In &quot;Ethics&quot;","block_context":{"text":"Ethics","link":"https:\/\/monodes.com\/predaelli\/category\/ethics\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5589,"url":"https:\/\/monodes.com\/predaelli\/2019\/05\/20\/adobe-warns-users-they-can-get-sued-if-they-use-old-photoshop-versions\/","url_meta":{"origin":2455,"position":3},"title":"Adobe Warns Users They Can Get Sued if They Use Old Photoshop Versions","author":"Paolo Redaelli","date":"2019-05-20","format":false,"excerpt":"https:\/\/techthelead.com\/adobe-warns-users-they-can-get-sued-if-they-use-old-photoshop-versions\/ Another good and sound reason to avoid proprietary software and use free as in freedom software, like Gimp","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5920,"url":"https:\/\/monodes.com\/predaelli\/2019\/09\/05\/apple-to-deprecate-scripting-languages-in-future-versions-of-macos-tidbits\/","url_meta":{"origin":2455,"position":4},"title":"Apple to Deprecate Scripting Languages in Future Versions of macOS &#8211; TidBITS","author":"Paolo Redaelli","date":"2019-09-05","format":false,"excerpt":"Apple says future versions of macOS won\u2019t include a number of open-source scripting languages. The impact of this change will vary depending on the audience, but it will affect more people than you might think. Source: Apple to Deprecate Scripting Languages in Future Versions of macOS - TidBITS This is\u2026","rel":"","context":"In &quot;Ethics&quot;","block_context":{"text":"Ethics","link":"https:\/\/monodes.com\/predaelli\/category\/ethics\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4619,"url":"https:\/\/monodes.com\/predaelli\/2018\/10\/08\/the-mobile-version\/","url_meta":{"origin":2455,"position":5},"title":"&#8220;the Mobile Version&#8221;","author":"Paolo Redaelli","date":"2018-10-08","format":"link","excerpt":"\u00abMicrosoft Is Embracing Android As the Mobile Version of Windows\u00bb reports Slashdot and most of the times it is as proprietary as Windows plus it tries to known everything about you and tell it to the great G that doesn't want anymore \"not to be evil\".","rel":"","context":"In &quot;Android&quot;","block_context":{"text":"Android","link":"https:\/\/monodes.com\/predaelli\/category\/android-2\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/2455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=2455"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/2455\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=2455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=2455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=2455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}