1 comment

[ 3.4 ms ] story [ 10.5 ms ] thread
Author here, happy to chat!

cargo-semver-checks implements the cargo reference's semver rules[0] directly as queries over the old and new version's APIs, as described by the rustdoc tool in JSON format.

This means that every semver issue it finds can be linked back to a specific rule entry in the cargo reference. The queries that encode the semver rules look for cases that break the rule, so each result of those queries names a specific struct/enum/field/etc. that was renamed/removed/etc.

Here's an example of what a semver rule violation; note the links to the cargo reference and the query that implements it, as well as the specific problematic enum and variant + their location: https://twitter.com/PredragGruevski/status/15476470038484254...

Excited to see what everyone here thinks! Just a note that this tool is only a few days old, so it doesn't do everything for everyone yet :)

[0]: https://doc.rust-lang.org/cargo/reference/semver.html