4 ms·
Semantic versioning is a curse. It makes perfect logical sense until you are a few iterations in and quickly run into dependency hell as shown in the diagrams i
by paxys 5y ago
Semantic versioning is a curse. It makes perfect logical sense until you are a few iterations in and quickly run into dependency hell as shown in the diagrams in the article.
My solution to this isn't "never update anything", but rather "never version anything". People can choose to stick to the bits they originally got, which is perfectly fine, or they can switch to the current "live" one. As a developer I'm only ever building and maintaining the latest source.
- HWR_14 5y agoVersioning things helps with bug reports. Oh, this was introduced in 3.144.42? Great, let's look at the changes to that build.
- SkeuomorphicBee 5y agoYou don't need semantic versioning for that. "Oh, this was introduced in build 22456" works just as well.
- nameisname 5y agoExcept that using a build number in the way you're describing is just a worse semantic version. You now have no way to indicate if your changes are breaking. Separation of your pipelines also just got a lot more hectic because you could have a situation where you don't know what happened when you're missing "versions" (builds) because it's failing but still incrementing... Using build numbers for versioning doesn't really work in a large ecosystem and often relies on picking the latest of a branch or having to sift through builds when deploying to find the right one.
- treis 5y agoI think the concept of a breaking change is part of the mistake. If you want to change something you should introduce the new way and support it side by side with the old for a while while going through a depreciation cycle. I'm with the GP on this. Pinning to a specific version is a code smell. You should have enough confidence in your regression suite to always use the latest version. And hopefully enough confidence in your vendors that they're not going to break a bunch of stuff.
- joombaga 5y agoThe concept only makes sense in the context of APIs. I don't know if that's obvious; I've seen people use semantic versioning with software that didn't have public interfaces. Even if you go through a deprecation cycle, you're still going to eventually have a build N with feature X, and build N+1 without feature X. That's a breaking change.
- treis 5y agoThat's true in the sense that a bullet flying at you and steam roller running you down both represent mortal threats. But practically a reasonable depreciation cycle isn't going to be a breaking change because everyone will have plenty of time to upgrade.
- sokoloff 5y ago> You now have no way to indicate if your changes are breaking. You now have no way to indicate that you know your changes are breaking.
- thrower123 5y agoYour build number tags the source control commit it was built from in any reasonably sanely implemented CI/CD system.
- nijave 5y agoI think semver is mostly useful for telling, at a glance, how much of the changelog/migration notes to read I've noticed (more frequently) npm packages quickly climbing in versions (1-17 in a couple years) but at least it's painfully obvious.
- jkrubin 5y ago100% the way to go. Also people in python land (myself included) Are prone to “emotional” versioning
- named-user 5y agohttp://sentimentalversioning.org/ http://sentimentalversioning.org/
- CTmystery 5y agoI'm trying to understand this comment. Do you never use package managers?
- nijave 5y agoI'm guessing they're referring to conflicting transitive dependencies. Everything works fine when you use version 1 on date A. A couple years down the road, all those depends have matured at different rates and the top level packages all specify different versions of the same transitive packages so you have to try to line them all up. On the other hand, the longer you wait to update, the worse it gets. Updating more frequently you can suss out packages moving quickly vs slowly vs not at all and address the problem before you're in update paralysis
- ReactiveJelly 5y ago> As a developer I'm only ever building and maintaining the latest source. That's valid under semver. The crazy diagrams show what happens when you want to support lots of old versions. I have semver stuff at work where I only maintain the latest version. Bugfixes bump the patch version, adding a feature bumps minor, removing a feature bumps major. I don't make any special effort to bump or avoid bumping anything. It gives me a rough idea of whether a given version has new stuff in it (x.1.0 or x.2.0) or is just a bugfix (x.0.1 or x.1.1) Dependency hell has nothing to do with how you label your versions and everything to do with how much you want to annoy users by breaking whatever you like vs annoy yourself by taking the time to set stable APIs and hold compatibility backwards and forwards. Semver vs. Git commit hashes vs. "just one number" vs. web browser versioning vs. "just timestamp" is all just different labels on the same soupcans.