-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add CI job to run cargo-semver-checks #1202
Conversation
This reverts commit b348ed3.
The semver check tooling is not going to detect breaking changes to types in the env packages that are reexported unfortunately. I tried a few different test cases, things like removing a trait impl such as the Default impl on Val, which doesn't appear to be used by anything but is visible in the soroban-sdk docs on the Val type, so should be considered part of the public API. And nothing in the env repo exported seems to get detected. This is due to limitations in rustdoc and cargo-semver-checks. See these issues for more details:
I'm still going ahead with this change because some API checking is better than none. I've also opened an issue on the env repo so that we track breaking changes there too since they are exported out of soroban-sdk: |
### What Add CI job to run cargo-semver-checks that will error if we make a breaking change to a patch or minor release. ### Why To monitor whether the changes being made to the soroban-sdk and its exports are a match for the version being targeted. The soroban-env-common and some of the guest and host crates are reexported by the soroban-sdk and essentially part of its API. Due to issues outlined in the comment below these checks cannot all be done on the soroban-sdk: - stellar/rs-soroban-sdk#1202 (comment) Also, independent of the above not breaking semver rules is relatively important in the Rust ecosystem because cargo favors selecting newer (maximum) instead of older (minimum) versions. While lock files exist, they aren't respected by default in some contexts like `cargo install` meaning introducing breaking changes into a crate can break downstream tools. (We avoid this on the products we publish by pinning exact versions of the env, but that is not common practice in the Rust ecosystem.) Close stellar/rs-soroban-sdk#1195 --------- Co-authored-by: Graydon Hoare <graydon@pobox.com>
What
Add CI job to run cargo-semver-checks
Why
To monitor whether the changes being made to the soroban-sdk and its exports are a match for the version being targeted.
Close #1195