{"id":42798,"date":"2022-03-25T15:35:36","date_gmt":"2022-03-25T15:35:36","guid":{"rendered":"https:\/\/polarising.com\/?p=42798"},"modified":"2022-04-14T10:47:24","modified_gmt":"2022-04-14T10:47:24","slug":"give-semantic-versioning-to-your-software","status":"publish","type":"post","link":"https:\/\/polarising.com\/techinside\/give-semantic-versioning-to-your-software\/","title":{"rendered":"Give semantic to your Software (1\/2)"},"content":{"rendered":"\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Software versioning exists for a long time, and most enterprises use Versioning to identify their software. We can see Versioning applied into a desktop application, web applications, libraries, APIs and other applications, and with Versioning we can correlate features and issues to a version.<\/p>\n\n\n\n<p>From the end user\u2019s point of view, the person who uses the application, the versioning goal it\u2019s to correlate issues and features to a version. But from the developer\u2019s point of view, the goals are broader.<\/p>\n\n\n\n<p>In application maintenance, the versioning correlation helps to identify in which version the issue exists and correct it. It is as straight forward as this. On the other hand, in application development the scope of the versioning is wider.<\/p>\n\n\n\n<p>In software development, while we are the producers of a versioned artefact (the applications themselves), we are also consumers of versioned artefacts, such as APIs and libraries.<\/p>\n\n\n\n<p>As to these last ones, software developers dread it so much that there&#8217;s a kind term for them: \u201cdependency hell,\u201d which comes in different flavors:<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>Long chains of dependencies<\/li><li>Conflicting dependencies<\/li><li>Circular dependencies<\/li><li>And many others<\/li><\/ul>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Although the version reduces many dependency risks, it is a pain to solve them from time to time.<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-image size-full\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"895\" height=\"594\" src=\"https:\/\/polarising.com\/techinside\/wp-content\/uploads\/2022\/04\/semantic-versioning-image.png\" alt=\"\" class=\"wp-image-42973\" srcset=\"https:\/\/polarising.com\/techinside\/wp-content\/uploads\/2022\/04\/semantic-versioning-image.png 895w, https:\/\/polarising.com\/techinside\/wp-content\/uploads\/2022\/04\/semantic-versioning-image-300x199.png 300w, https:\/\/polarising.com\/techinside\/wp-content\/uploads\/2022\/04\/semantic-versioning-image-768x510.png 768w\" sizes=\"auto, (max-width: 895px) 100vw, 895px\" \/><\/figure><\/div>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"the-data-modeling-solution-that-will-deliver-the-future\">Semantic Versioning<\/h2>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Almost every application in the world applies semantic Versioning, or at least a kind of semantic Versioning that makes sense in their scope. The&nbsp;<a href=\"https:\/\/semver.org\/#semantic-versioning-specification-semver\" target=\"_blank\" rel=\"noreferrer noopener\">\u201cSemantic Versioning Specification\u201d (SemVer)<\/a>&nbsp;is quite simple and without many complex \u201cbullet points\u201d, but what is essential is the focus of the semantic of the Versioning, and not being semantic about the semantic.<\/p>\n\n\n\n<p>Long story short, you have a component with the version composed in the following manner:<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><em><strong>MAJOR.MINOR.PATCH<\/strong><\/em><\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Where:<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Major<\/strong>,&nbsp;<strong>Minor,<\/strong>&nbsp;and&nbsp;<strong>Patch<\/strong>&nbsp;are digits.<\/li><li>Change in the&nbsp;<strong>Patch<\/strong>&nbsp;number: implies that only bugs were fixed and are backward compatible.<\/li><li>Change in the&nbsp;<strong>Minor<\/strong>&nbsp;number: implies that features were added and are still backward compatible.<\/li><li>Change in the&nbsp;<strong>Major<\/strong>&nbsp;number: assume that breaking changes were made and&nbsp;<strong>are not<\/strong>&nbsp;backward compatible.<\/li><li>Every time a version changes one of these numbers changed, and all version changes are incremental.<\/li><\/ul>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>For example:<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>If version 1.0.0 has a bug fixed (or more), then the version increases to 1.0.1.<\/li><li>If version 1.0.1 has some feature added, then the version increases to 1.1.0.<\/li><li>The Minor version increases, and the Patch version is to zero.<\/li><li>If version 1.1.0 has some feature added that introduced breaking changes, then the version increases to 2.0.0. The Major version increases, while the Minor and Patch version reset to zero.<\/li><\/ul>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>While the Versioning of a&nbsp;<strong>public \u201cAPI\u201d<\/strong>&nbsp;starts in version 1.0.0, while we are at the beginning of the component development, the major version must be zero (0.y.z). By adopting this naming convention, the consumer knows that the component\u2019s version is not intended for public use yet, so it may not be considered stable.<\/p>\n\n\n\n<p>Semantic Versioning also provides a way to identify Production versions from Beta versions. To differentiate these versions, Beta versions have appended a&nbsp;<em>hyphen&nbsp;<\/em>and a series of dot-separated identifiers.<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>For example:<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>1.0.0-alpha, 1.0.0-alpha.1, 1.0.0\u20130.3.7, 1.0.0-x.7.z.92, etc.<\/li><\/ul>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>And the pre-released version has lower precedence than the standard version, ex: 1.0.0-alpha &lt; 1.0.0.<\/p>\n\n\n\n<p>With this pre-released nomenclature, some may argue that it could be chaotic to identify the most recent pre-released versions. Which is most recent: 1.0.0-alpha or 1.0.0-alpha.1? Semantic Versioning also gives some recommendations to these scenarios.<\/p>\n\n\n\n<p>Within two pre-released versions, we identify the most recent version by alphabetically sorting them.<\/p>\n\n\n\n<p>From section 11 (<a href=\"https:\/\/semver.org\/#spec-item-11\" target=\"_blank\" rel=\"noreferrer noopener\">Precedence refers to how versions are compared to each other when ordered<\/a>), paragraph 4:<\/p>\n\n\n\n<p>Precedence for two pre-released versions with the same major, minor, and patch version, MUST be compared each dot-separated identifier from left to right until identifying the difference, as follows:<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>Identifiers consisting of only digits are compared numerically in ASCII sort order.<\/li><li>Identifiers with letters or hyphens are compared lexically in ASCII sort order.<\/li><li>Numeric identifiers always have lower precedence than non-numeric identifiers.<\/li><li>A more extensive set of pre-released fields has higher precedence than a smaller set if all the preceding identifiers are equal.<\/li><\/ul>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>It is no coincidence that companies have released candidates\u2019 versions with RC identifiers. For example, in Microsoft .NET Core there are the following versions:<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>3.0.100-preview9\u2013014004 &lt; 3.0.100-rc1\u2013014190 &lt; 3.0.100<\/li><\/ul>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>In the section \u201c<a href=\"https:\/\/semver.org\/#backusnaur-form-grammar-for-valid-semver-versions\" target=\"_blank\" rel=\"noreferrer noopener\">Backus\u2013Naur Form Grammar for Valid SemVer Versions<\/a>,\u201d we have listed all valid combinations to describe a version semantically. But let us keep it simple.<\/p>\n\n\n\n<p>If you like to verify if you\u2019re working in a semantic version,&nbsp;<a href=\"https:\/\/semver.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">SemVer<\/a>&nbsp;has two regexes to validate the version. One of them you may check at this link: <a href=\"https:\/\/regex101.com\/r\/vkijKf\/1\/\" target=\"_blank\" rel=\"noopener\">https:\/\/regex101.com\/r\/vkijKf\/1\/<\/a><\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"the-data-modeling-solution-that-will-deliver-the-future\">Conclusion<\/h2>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Semantic Versioning<\/strong>&nbsp;is an essential concept in software development, and many tools rely on it to validate, control, and manage software and its dependencies. By using the concept with the proper semantic, developers can rest while consolidating the project\u2019s dependencies and keep up to date with the dependencies versions.<\/p>\n\n\n\n<p>It is vital that software development teams understand Semantic Versioning\u2019s meaning and do not create ambiguity or semantics about them. Misconceptions create noise, and that noise may create integration challenges.<\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Nuno Cancelo<\/strong><br>Polarising\u2019s Microsoft Practice Lead<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Software versioning exists for a long time, and most enterprises use Versioning to identify their software. We can see Versioning applied into a desktop application, web applications, libraries, APIs and other applications, and with Versioning we can correlate features and issues to a version. From the end user\u2019s point of view, the person who uses [&hellip;]<\/p>\n","protected":false},"author":136,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"categories":[4],"tags":[],"class_list":["post-42798","post","type-post","status-publish","format-standard","hentry","category-technology"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"authorship-box-avatar":false,"authorship-box-related":false},"uagb_author_info":{"display_name":"","author_link":"https:\/\/polarising.com\/techinside\/author\/?mab_v3=42798"},"uagb_comment_info":0,"uagb_excerpt":"Software versioning exists for a long time, and most enterprises use Versioning to identify their software. We can see Versioning applied into a desktop application, web applications, libraries, APIs and other applications, and with Versioning we can correlate features and issues to a version. From the end user\u2019s point of view, the person who uses&hellip;","_links":{"self":[{"href":"https:\/\/polarising.com\/techinside\/wp-json\/wp\/v2\/posts\/42798","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/polarising.com\/techinside\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/polarising.com\/techinside\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/polarising.com\/techinside\/wp-json\/wp\/v2\/users\/136"}],"replies":[{"embeddable":true,"href":"https:\/\/polarising.com\/techinside\/wp-json\/wp\/v2\/comments?post=42798"}],"version-history":[{"count":3,"href":"https:\/\/polarising.com\/techinside\/wp-json\/wp\/v2\/posts\/42798\/revisions"}],"predecessor-version":[{"id":42978,"href":"https:\/\/polarising.com\/techinside\/wp-json\/wp\/v2\/posts\/42798\/revisions\/42978"}],"wp:attachment":[{"href":"https:\/\/polarising.com\/techinside\/wp-json\/wp\/v2\/media?parent=42798"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/polarising.com\/techinside\/wp-json\/wp\/v2\/categories?post=42798"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/polarising.com\/techinside\/wp-json\/wp\/v2\/tags?post=42798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}