4 ms·
This is funny because everybody makes mistakes , so of course people fail at semver. However, if you are the maintainer of a popular cargo package, and make a
by volta83 5y ago
This is funny because everybody makes mistakes , so of course people fail at semver.
However, if you are the maintainer of a popular cargo package, and make a mistake, people _will let you know_. Because a lot of people in the Rust ecosystem expect versions to follow semver.
Crates that fail to adhere stop being used, get bad rep, people fork them, and keep them stable, making them loose users.
Rust actually has a tool called rust-semverver that does an AST to AST diff of the current version of a crate that you want to release, with the latest release, and suggests how to increment the version.
It can list all API changes, and it will tell you which changes are minor, major, or patch.
You can use it in your deployment workflow on CI to, e.g., deploy a new version of a crate only if, the changes follow the version change that was specified. Such that, e.g., if you bump your 2.0.0 crate to 2.1.0 but your crate has an API breaking change, the tool and CI fails telling you that you need to change the version to 3.0.0 because of these changes.
- judofyr 5y agoWell, it seems like most of the critical packages in the Rust ecosystem are at 0.x so I’m not sure how much this is being done in practice.