3 ms·
As a co-author of the post, I wouldn't agree with that summary. If semver suggests a release isn't breaking, in Rust it overwhelmingly isn't breaking. Around 3
by obi1kenobi 3y ago
As a co-author of the post, I wouldn't agree with that summary.
If semver suggests a release isn't breaking, in Rust it overwhelmingly isn't breaking. Around 3% of the time, assuming you use every obscure bit of public API in the library, you might get broken by a release when you shouldn't be. In practice, that percentage is way lower than that: nobody uses the entire public API of anything, or comes anywhere close. That's why the post says these semver violations were unknown, even though most of them were multiple years old. If something breaks, and you weren't using it anyway, you were not broken.
The post is emphatically in favor of semver as used by Rust, because it has clear benefits and works great the vast majority of the time. The part that we want to make better is to lower the odds even further that an accidental breaking change breaks a bunch of people's code and ruins their day.
No single technique can do that: not testing, not fuzzing, not cargo-semver-checks. But a sound combination of techniques can drive the odds to damn near zero for all practical purposes.
- alex_lav 3y agoI'd be curious about these metrics for a more widely used language. Admittedly I'm not discussing SemVer _in Rust_, as much as just SemVer, which is in my direct experience just kind of a mess. Adherence is as good or bad as any library's tooling or developers want it to be.
- obi1kenobi 3y agoI'm curious too! And I also agree that semver in _most_ languages is a mess. I'm sure someone could build a semver-checker for Python or JS or Java or whatever, and I'd even be willing to help them and walk them through how cargo-semver-checks works. But in Rust, a big driver of adoption is that Rust and cargo are opinionated about things, so people adopt cargo-semver-checks not necessarily out of love for semver but out of a desire to not wake up to 100 people being upset in their GitHub issues about broken builds. The adoption situation might be harder for other languages with less opinionated versioning stories.