Closed nicopap closed 8 months ago
I updated to 2.4.0 and my code stopped compiling.
2.4.0
Minor bump should not lead to compilation failures.
Semver recommends that after version 1.0.0, bumps to the minor version (in this case from 2.3.0 to 2.4.0) should be backward compatible.
1.0.0
Backward compatibility has been broken in 2.4.0. The release note even mentions a breaking change https://github.com/longbridgeapp/rust-i18n/releases/tag/v2.4.0
cargo uses semver to deduplicate dependencies, if a crate's release number doesn't follow semver, this will break cargo, resulting in confusion for the end-users, see the cargo reference for explanation https://doc.rust-lang.org/cargo/reference/resolver.html#semver-compatibility
Cargo also promises that a simple cargo update won't break your code. If a crate doesn't follow semver, running cargo update will result in user code breaking.
cargo update
I will yank 2.4.0 and release 3.0.0
Thank you!
I updated to
2.4.0
and my code stopped compiling.What I expected
Minor bump should not lead to compilation failures.
Semver recommends that after version
1.0.0
, bumps to the minor version (in this case from 2.3.0 to 2.4.0) should be backward compatible.Backward compatibility has been broken in 2.4.0. The release note even mentions a breaking change https://github.com/longbridgeapp/rust-i18n/releases/tag/v2.4.0
Why Semver maters
cargo uses semver to deduplicate dependencies, if a crate's release number doesn't follow semver, this will break cargo, resulting in confusion for the end-users, see the cargo reference for explanation https://doc.rust-lang.org/cargo/reference/resolver.html#semver-compatibility
Cargo also promises that a simple
cargo update
won't break your code. If a crate doesn't follow semver, runningcargo update
will result in user code breaking.