3 ms·
It looks like this article is nonsense. The author is confusing the (sometimes bad) behavior of package managers with version numbers. Version numbers signal
by jmull 9y ago
It looks like this article is nonsense.
The author is confusing the (sometimes bad) behavior of package managers with version numbers.
Version numbers signal the intent of the release, but don’t guarantee anything. Any change in a dependency might break your project so no update is safe, regardless of what the version number says. That’s why people pin version (or, at least should be why.) It’s not a problem of version numbers at all.
That doesn’t make version numbers useless, though. Understanding the intent of an update is important info. It lets you estimate the cost/risk of taking an update.
So the author suggests that changing versioning will somehow improve things, when what we actually want is for package managers to be conservative by default.
He actually suggests that the latest version with the same major version be taken. That would work as long as... (1) none of your dependencies ever introduces bugs or accidental compatibility changes in a non-major update; and (2) all contributors update dependencies in lockstep (since any new code contribution could be dependent on a feature or behavior of a newer version of a dependency). In other words, that doesn’t work at all.
What we want is for package managers to lock the dependencies by default and for package repositories to require a version update when committing a dependency update. In fact, better to take the version number out of it: lock dependencies to the commit hash and leave version numbers for what they are good for, to communicate intent.