2 ms·
I have a crazy theory about versioning, except it's not the idea itself that's crazy, but what you have to do to get it. Software versioning is a case of the X
by hinkley 9y ago
I have a crazy theory about versioning, except it's not the idea itself that's crazy, but what you have to do to get it.
Software versioning is a case of the XY Problem. We don't know what we want, but we know something that might help us get it (and we are wrong).
We don't care if you add behavior to your library (unless it fulfills a need we had or didn't know we had). What we really care about is if you take behavior away. And in some cases it's not even all the behavior. If I'm only using 20% of your library and you haven't changed it, I can keep upgrading whenever.
What semantic versioning is trying and failing to achieve is to make libraries adhere to the Liskov Substitution Principle (LSP). If you had a library that had sufficient tests, then any change you make that causes you to add tests but not change an existing test means that it should satisfy the LSP (tests that correct ambiguities in the spec notwithstanding). People can feel pretty safe upgrading if all of the tests they depend on are intact.
The difficult part of this 'solution' is that reusable code would have to have pretty exhaustive test coverage. I think we are already bifurcating into a world of library authors and library consumers, so I'm okay with this. We should feel comfortable demanding more than what we currently get from our library writers. In this world, what you version is your test harness, and not your code.