Bump version to 22.0.10 - #1731
Closed
github-actions[bot] wants to merge 2 commits into
Closed
Conversation
github-actions
Bot
requested review from
Copilot
and removed request for
Copilot
February 13, 2026 14:14
### What Use fully qualified syntax (`<Type as Trait>::func()`) in macro-generated WASM exports when `#[contractimpl]` is applied to a trait impl block. ### Why Rust's name resolution prefers inherent methods over trait methods when using `<Type>::func()` syntax. If a contract type has both an inherent method and a trait method with the same name, the generated export incorrectly calls the inherent method instead of the trait method the `#[contractimpl]` block is defined for. (cherry picked from commit e92a393) (cherry picked from commit 347f711)
Contributor
There was a problem hiding this comment.
Pull request overview
This PR bumps the workspace version to 22.0.10 for a release branch, and also includes a few SDK behavior fixes with accompanying tests/snapshots.
Changes:
- Bump workspace/crate versions from 22.0.8 → 22.0.10 (and update
Cargo.lockaccordingly). - Prevent integer overflow wrapping in
Bytes::slice,Vec::slice, andprng().gen_rangeby switching to checked arithmetic. - Fix
#[contractimpl] impl Trait for Typeexport generation to call the trait method via UFCS, and add regression tests + a new snapshot.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| soroban-sdk/test_snapshots/tests/contractimpl_trait_call_resolution/calls_trait_fn.1.json | Adds snapshot for the new trait-call-resolution regression test. |
| soroban-sdk/src/vec.rs | Uses checked arithmetic for slice bounds to avoid overflow. |
| soroban-sdk/src/unwrap.rs | Adds expect_optimized API used by new checked arithmetic paths. |
| soroban-sdk/src/tests/vec_slice.rs | New tests covering Vec::slice normal behavior + overflow/out-of-bounds cases. |
| soroban-sdk/src/tests/prng_range.rs | New tests for prng().gen_range range bound edge cases (incl. overflow/underflow). |
| soroban-sdk/src/tests/contractimpl_trait_call_resolution.rs | New regression test ensuring #[contractimpl] calls the trait method, not an inherent one. |
| soroban-sdk/src/tests/bytes_slice.rs | New tests covering Bytes::slice normal behavior + overflow/out-of-bounds cases. |
| soroban-sdk/src/tests.rs | Wires the new test modules into the test suite. |
| soroban-sdk/src/prng.rs | Uses checked arithmetic for range bounds in GenRange for u64. |
| soroban-sdk/src/bytes.rs | Uses checked arithmetic for slice bounds to avoid overflow. |
| soroban-sdk-macros/src/lib.rs | Emits UFCS (<Type as Trait>::func) when generating exports for trait impls. |
| soroban-sdk-macros/src/derive_fn.rs | Removes now-unneeded trait import injection in generated wrappers. |
| Cargo.toml | Bumps workspace version and workspace dependency versions to 22.0.10. |
| Cargo.lock | Updates crate versions recorded in the lockfile to 22.0.10. |
Comment on lines
14
to
+24
| [workspace.package] | ||
| version = "22.0.9" | ||
| version = "22.0.10" | ||
| rust-version = "1.84.0" | ||
|
|
||
| [workspace.dependencies] | ||
| soroban-sdk = { version = "22.0.9", path = "soroban-sdk" } | ||
| soroban-sdk-macros = { version = "22.0.9", path = "soroban-sdk-macros" } | ||
| soroban-spec = { version = "22.0.9", path = "soroban-spec" } | ||
| soroban-spec-rust = { version = "22.0.9", path = "soroban-spec-rust" } | ||
| soroban-ledger-snapshot = { version = "22.0.9", path = "soroban-ledger-snapshot" } | ||
| soroban-token-sdk = { version = "22.0.9", path = "soroban-token-sdk" } | ||
| soroban-sdk = { version = "22.0.10", path = "soroban-sdk" } | ||
| soroban-sdk-macros = { version = "22.0.10", path = "soroban-sdk-macros" } | ||
| soroban-spec = { version = "22.0.10", path = "soroban-spec" } | ||
| soroban-spec-rust = { version = "22.0.10", path = "soroban-spec-rust" } | ||
| soroban-ledger-snapshot = { version = "22.0.10", path = "soroban-ledger-snapshot" } | ||
| soroban-token-sdk = { version = "22.0.10", path = "soroban-token-sdk" } |
There was a problem hiding this comment.
The PR title/description indicate this is only a version bump/release branch, but this diff also includes functional changes (overflow handling changes in slice/gen_range, plus a #[contractimpl] behavior fix and new tests). Please update the PR title/description (or split into separate PRs) so the release branch accurately communicates the included behavioral changes.
mootz12
approved these changes
Feb 13, 2026
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Bump version to 22.0.10, creating release branch.
Why
Triggered by @leighmcculloch in https://github.com/stellar/rs-soroban-sdk/actions/runs/21989987100.
What is next
See the release instructions for a full rundown on the release process:
https://github.com/stellar/actions/blob/main/README-rust-release.md
Commit any changes to the
release/v22.0.10branch that are needed in this release.If this is a regular release releasing from
main, merge this PR when ready, and after merging, create a release for this version by going to this link: https://github.com/stellar/rs-soroban-sdk/releases/new?tag=v22.0.10&title=22.0.10If this is a backport or patch release of a past version, see the release instructions. When ready to release this branch create a release by going to this link:
https://github.com/stellar/rs-soroban-sdk/releases/new?tag=v22.0.10&title=22.0.10&target=release/v22.0.10