cargo-semver-checks v0.7.0 protects against auto-trait semver regressions

140 points obi1kenobi82

cargo-semver-checks is a new semver linter: it helps you make sure you don't break semver rules when publishing a new version of your crate.

The new v0.7.0 release includes checks for:

  • auto-trait impls on pub types
  • derived traits on pub types
  • pub use re-exports

Auto-trait semver breaks are especially tricky, and can happen to anyone. Make one private field an Rc — oops, your type isn't Send / Sync anymore! Even clap had one in v3.2.6. It's so easy to miss, but not anymore: if cargo-semver-checks v0.7.0 had existed at the time, it could have caught and prevented clap's semver break.

Use it as a GitHub Action by putting this line right before cargo publish:

- uses: obi1kenobi/cargo-semver-checks-action@v1

Find the code here: https://github.com/obi1kenobi/cargo-semver-check