Skip to content

Bump version to 22.0.10 - #1731

Closed
github-actions[bot] wants to merge 2 commits into
release/v22.0.9from
release/v22.0.10
Closed

Bump version to 22.0.10#1731
github-actions[bot] wants to merge 2 commits into
release/v22.0.9from
release/v22.0.10

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

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.10 branch 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.10

If 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

@github-actions
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)
Copilot AI review requested due to automatic review settings February 13, 2026 14:38
@leighmcculloch
leighmcculloch changed the base branch from main to release/v22.0.9 February 13, 2026 14:39
@leighmcculloch
leighmcculloch marked this pull request as draft February 13, 2026 14:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.lock accordingly).
  • Prevent integer overflow wrapping in Bytes::slice, Vec::slice, and prng().gen_range by switching to checked arithmetic.
  • Fix #[contractimpl] impl Trait for Type export 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 thread Cargo.toml
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" }

Copilot AI Feb 13, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@leighmcculloch

Copy link
Copy Markdown
Member

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.

3 participants