2 ms·
The trick is that when your dependency tree is huge (as it is in typical ruby , and _even more so_ in typical Javascript, projects these days) -- you can't poss
by jrochkind1 8y ago
The trick is that when your dependency tree is huge (as it is in typical ruby , and _even more so_ in typical Javascript, projects these days) -- you can't possibly have time to go review docs for everything in your dependency tree (including indirect dependencies).
The promise of semver is that you can let tooling _automatically_ update all dependencies that haven't bumped a major version. Thereby getting bug fixes, security patches (important!), and even new features, without having to manually review changelogs for hundreds/thousands of dependencies. I think that's basically it's whole point, the context of automatic tooling.
Is it perfect? No. Because some dependencies don't use semver; some maintainers make mistakes and there are 'bugs' in their release numbers; _and_ sometimes bugfixes and even security patches are available _only_ in a major release, so your automatic updates might miss them.
Is it helpful? In my experience in ruby, immensely. (It's probably no coincidence that semver was invented by a rubyist, at about the same time bundler, the tooling that can easily support this kind of updates, came into existence). You have to deal with the edge cases where it doesn't work, but it still works _a lot_, eliminating a _lot_ of manual review.
Ironically, javascript, which seems to be the ecosystem with the hugest dependency trees, only fairly recently got tooling that can conveniently do this kind of dependency update based on semver -- if you choose to use it this way. It depends on tooling, but also on developer behavior, both as maintainers and as consumers of dependencies, to have standard practices where "update everything but without any breaking changes" approaches are feasible.
I think it's indisputable that semver has made it more feasible to handle larger dependency trees in ruby. In fact, I think the most valid critique would be based on it's _success_ -- the "tooling" (including semver as a "social tool") has allowed much more complex dependency trees to be feasible, at least initially, and this is a _bad_ thing, because it opens you up to much more complex, dangerous, and hard to deal with dependency management hell problems down the line, when you have so many dependencies you can't feasibly even have any idea what they all are. Which you couldn't have even gotten to that point without the tooling that made it seem like it was feasible, and it shouldn't have.
This could be a reasonable argument, worth considering, I'm not necessarily making it myself. We quite literally couldn't be creating the software we are creating without the growth of open source dependencies, it would be too expensive.