3 ms·
Tool author here! I wrote a blog post that explains the motivation for building cargo-semver-checks here: https://predr.ag/blog/toward-fearless-cargo-update/ h
by obi1kenobi 3y ago
Tool author here! I wrote a blog post that explains the motivation for building cargo-semver-checks here:
https://predr.ag/blog/toward-fearless-cargo-update/ https://predr.ag/blog/toward-fearless-cargo-update/
TL;DR: Semver is particularly tricky in Rust and can be broken in many far-from-obvious ways. When a library breaks semver it can cause compile errors in every downstream bit of code that uses it. This sucks for everyone on all sides.
- bloopernova 3y agooh interesting, thank you! So semver is something that Rust always uses and enforces as opposed to stuff I've seen where it's a manual number added by a human. Cool, I can definitely see how that would cause issues, and your examples+blog were helpful. Much appreciated! Could there be a workflow in Rust compilation or packaging that uses your tool and says "oops, looks like the semver needs to be updated, can I do that for you?"
- obi1kenobi 3y agocargo-semver-checks is in the process of being merged into cargo itself, which would make the default publishing process into essentially exactly what you describe! Running `cargo publish` would check for semver issues and alert if it finds anything. Users would be able to override it, of course, but most often they'd probably accept the version change or revert the semver break if it wasn't intended.