shadowsocks-rust icon indicating copy to clipboard operation
shadowsocks-rust copied to clipboard

`shadowsocks` broke semver by upgrading `shadowsocks-crypto` from `^0.3.3` to `^0.5.1`

Open faern opened this issue 2 years ago • 0 comments
trafficstars

I just bumped our dependency on shadowsocks by just doing cargo update -p shadowsocks. This sticks to semver compatible releases (1.14 -> 1.15 in this case). But then my code stopped compiling. Because we were using shadowsocks::crypto::v1::CipherKind, a type that no longer existed.

This is because shadowsocks publicly re-exports shadowsocks-crypto, the API for shadowsocks-crypto changed in a semver breaking way.

I like the convenience of having shadowsocks-crypto re-exported directly from shadowsocks. But also, shadowsocks-crypto is a 0.x release and shadowsocks is at 1.y. It's probably not ideal to publicly re-export an "unstable" crate in the public API of a stable crate.

You could potentially try out semver checking software before a release, to check if you did not break the API. Such as https://crates.io/crates/cargo-semver-checks or https://crates.io/crates/semverver.

faern avatar Mar 06 '23 09:03 faern