Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check incompatible changes with cargo-semver-checks #28

Merged
merged 1 commit into from
Oct 10, 2024
Merged

Conversation

xoen
Copy link
Collaborator

@xoen xoen commented Oct 10, 2024

cargo-semver-checks can detect if any change which is backward-incompatible is introduced.

It works by comparing current version in Cargo.toml (unpublished 0.3.0 in our case) against the latest published version (0.2.0 in this case) and checking against a bunch of rules if the new changes are compatible or whether we need to bump the version.

In this case as the Cargo.toml was already changed from 0.2.0 => 0.3.0 the checks don't fail, but if we didn't bump the version it would have failed because of the various breaking changes we've made.

It is useful to have CI run this as sometimes changes can be backward-incompatible in surprising ways.

[`cargo-semver-checks`] can detect if any change which is
backward-incompatible is introduced.

It works by comparing current version in `Cargo.toml` (unpublished `0.3.0`
in our case) against the latest published version (`0.2.0` in this case)
and checking against a bunch of rules if the new changes are compatible or
whether we need to bump the version.

In this case as the `Cargo.toml` was already changed from `0.2.0` => `0.3.0`
the checks don't fail, but if we didn't bump the version it would have
failed because of the various breaking changes we've made.

It is useful to have CI run this as sometimes changes can be backward-incompatible
in surprising ways.

[`cargo-semver-checks`]: https://github.com/obi1kenobi/cargo-semver-checks
@jnioche jnioche added this to the 0.3.0 milestone Oct 10, 2024
@jnioche jnioche merged commit b5ea36f into main Oct 10, 2024
1 check passed
@jnioche jnioche deleted the semver-checks branch October 10, 2024 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants