|
| 1 | +--- |
| 2 | +title: We are changing versioning scheme |
| 3 | +perex: | |
| 4 | + I have always used the semantic versioning (SemVer) scheme for my projects. However, after discussing with my friend |
| 5 | + Lukáš Hornych and conducting further research with the team, we have decided to change the versioning scheme for |
| 6 | + evitaDB. The new scheme will be a Calendar Versioning. If you are interested in following our debate, read on. |
| 7 | +date: '14.1.2024' |
| 8 | +author: 'Jan Novotný' |
| 9 | +motive: assets/images/11-versioning-scheme.png |
| 10 | +proofreading: 'done' |
| 11 | +--- |
| 12 | + |
| 13 | +[Semantic Versioning](https://semver.org/) promises that your users can think about the impact of upgrading to a new |
| 14 | +version of your software. But is this really true? There are numerous articles that argue otherwise - I'd recommend |
| 15 | +[this discussion on Hacker News](https://news.ycombinator.com/item?id=21967879) and especially |
| 16 | +[this blog post](https://sedimental.org/designing_a_version.html). |
| 17 | + |
| 18 | +SemVer brings interesting psychological factors into play. Far too often we see libraries with dozens of minor releases |
| 19 | +that never reach version 1.0. Why not? Maybe the author is afraid to commit to a stable API. Maybe the production |
| 20 | +release looks like too much responsibility. I fell into this trap myself - I was avoiding the 1.0 release until |
| 21 | +I screwed up and while testing the automatic release on GitHub, I accidentally released version 10.1 instead of 0.10. |
| 22 | +And since Maven Central (for good reasons) does not allow to [delete artifacts](https://central.sonatype.org/faq/can-i-change-a-component/), |
| 23 | +we were stuck with it. You might not think this is a big deal, but there are a lot of projects that have fallen into |
| 24 | +this trap, including pretty big names like [ReactNative](https://reactnative.dev/versions), |
| 25 | +[Elm-Language](https://elm-lang.org/news), and there's even a dedicated [website](https://0ver.org/) that tracks |
| 26 | +(or tracked) projects with zero versioning. |
| 27 | + |
| 28 | +On the other hand, there are projects that very quickly increase the major version number to make themselves look more |
| 29 | +mature or up-to-date, or maybe just because they "don't care" about backwards compatibility! One of the most famous |
| 30 | +examples of the versioning battle was the [Chrome vs. Firefox battle](https://sedimental.org/designing_a_version.html#case-study-chrome-vs-firefox) |
| 31 | +for the most significant version number. So - if the major version is more about marketing than actual API stability, |
| 32 | +should we even care about it? |
| 33 | + |
| 34 | +The compatibility guarantee is also a very tricky thing - if your project is popular enough, any change in it that |
| 35 | +somehow affects its behavior will [break someone's code](https://xkcd.com/1172/), even if the API stays the same. |
| 36 | +You will never be able to anticipate other people's expectations and assumptions. |
| 37 | + |
| 38 | +There are also very good and balanced [defenses of the SemVer idea](https://caremad.io/posts/2016/02/versioning-software/) |
| 39 | +that we considered, but in the end we decided to go with calendar versioning, specifically the `YYYY.MINOR.MICRO` variant, |
| 40 | +for the following reasons: |
| 41 | + |
| 42 | +1. no matter how hard we try, we will never be able to guarantee backwards compatibility - unless we have a very |
| 43 | + thorough test suite that covers all possible use cases, which evitaDB does not and probably never will have (let's be |
| 44 | + honest) |
| 45 | +2. we commit to trying to maintain backwards compatibility, and if it is knowingly broken, we will mark the release |
| 46 | + with a "breaking change" label (we already do this at the issue level), and once the project gets out of the |
| 47 | + "pre-release" stage, we will try to consolidate critical changes into larger milestones. |
| 48 | +3. if only the `MICRO` part changes, you can rest assured that the only changes in the build are fixes that are intended |
| 49 | + to be backward-compatible. |
| 50 | +4. if the `MINOR` part changes, it means there are new features - you should always check the release notes to see |
| 51 | + what's new and whether they contain breaking changes or not. |
| 52 | +5. you should always have your own test suite to verify that the new version works for you - if you don't, you shouldn't |
| 53 | + update the library anyway |
| 54 | +6. the `YYYY` part changes automatically with the first new `MINOR` release of the year - since our library is |
| 55 | + BSL-licensed, you can easily guess if the library you're using is still BSL-licensed or has already transitioned to |
| 56 | + Apache License 2.0. |
| 57 | +7. the `YYYY` part also helps you to see how old the version you're using is and easily identify whether we provide |
| 58 | + security updates and fixes for it or not (if we ever come up with such an offer). |
| 59 | + |
| 60 | +So CalVer makes sense for us and we'll see how it goes. We will be releasing the first version with this schema in |
| 61 | +the next few days. |
0 commit comments