Skip to content

Commit 6656a27

Browse files
Bump version to 27.0.0-rc.1 (#1912)
### What Bump version to 27.0.0-rc.1, creating release branch. ### Why Triggered by @mootz12 in https://github.com/stellar/rs-soroban-sdk/actions/runs/27658089740. ### 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/v27.0.0-rc.1` 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=v27.0.0-rc.1&title=27.0.0-rc.1 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=v27.0.0-rc.1&title=27.0.0-rc.1&target=release/v27.0.0-rc.1 --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Leigh <351529+leighmcculloch@users.noreply.github.com>
1 parent afa3fb9 commit 6656a27

5 files changed

Lines changed: 138 additions & 86 deletions

File tree

.github/workflows/test-with-openzeppelin-stellar-contracts.yml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,36 @@ jobs:
6767
is_a_contract=$(cargo metadata --no-deps --format-version 1 | jq -r --arg pwd "$(pwd)" '.packages[] | select(.manifest_path == "\($pwd)/Cargo.toml") | (any(.dependencies[]; .name == "soroban-sdk") and any(.targets[]; any(.crate_types[]; . == "cdylib")))')
6868
echo "is-a-contract=$is_a_contract" | tee -a $GITHUB_OUTPUT
6969
70+
- name: Align the local soroban-sdk version with the destination
71+
working-directory: ${{ github.workspace }}
72+
run: |
73+
# The destination workspace pins soroban-sdk (and the other published
74+
# rs-soroban-sdk crates) to a released version, and pulls crates such as
75+
# soroban-poseidon from crates.io that depend on that same major. When the
76+
# local checkout has bumped to a newer major (for example a 27.0.0-rc
77+
# release), the [patch.crates-io] + `cargo update --precise` step below can't
78+
# redirect those transitive soroban-sdk edges, because Cargo only applies a
79+
# patch when the local version satisfies the requirement (soroban-poseidon's
80+
# ^26). Relabel the local crates with the version the destination already
81+
# resolves so the patch satisfies the requirement, collapsing every
82+
# soroban-sdk edge onto the local checkout's code regardless of the bump.
83+
dest_version=$(
84+
cargo metadata --manifest-path stellar-contracts/Cargo.toml --format-version 1 \
85+
| jq -r '.packages[] | select(.name == "soroban-sdk") | .version' \
86+
| head -n1
87+
)
88+
local_version=$(
89+
cargo metadata --manifest-path rs-soroban-sdk/Cargo.toml --format-version 1 --no-deps \
90+
| jq -r '.packages[] | select(.name == "soroban-sdk") | .version'
91+
)
92+
echo "destination soroban-sdk version: ${dest_version:?could not determine destination soroban-sdk version}"
93+
echo "local soroban-sdk version: $local_version"
94+
if [ "$dest_version" != "$local_version" ]; then
95+
escaped=$(printf '%s' "$local_version" | sed 's/[.]/\\./g')
96+
sed -i "s|\"$escaped\"|\"$dest_version\"|g" rs-soroban-sdk/Cargo.toml
97+
echo "Relabelled local rs-soroban-sdk crates from $local_version to $dest_version"
98+
fi
99+
70100
- name: Collect publishable rs-soroban-sdk crates
71101
working-directory: stellar-contracts
72102
run: |
@@ -118,8 +148,10 @@ jobs:
118148
# checkout's version with `cargo update --precise`, so the transitive
119149
# edges move onto it. Pinning (rather than letting cargo pick the highest
120150
# compatible version) stops a newer *published* SDK from being chosen for a
121-
# transitive edge and re-splitting the graph. (Can't rescue an
122-
# incompatible-major transitive dep; that would need the remedy in #1723.)
151+
# transitive edge and re-splitting the graph. (When the local checkout is
152+
# an incompatible major, the "Align the local soroban-sdk version with the
153+
# destination" step above first relabels it to the destination's version,
154+
# so these requirements stay satisfiable; see #1723.)
123155
if [ -s "$RUNNER_TEMP/sdk-crates.tsv" ]; then
124156
# Don't emit a second [patch.crates-io] header if one already exists upstream.
125157
grep -q '^\[patch\.crates-io\]' Cargo.toml || printf '\n[patch.crates-io]\n' >> Cargo.toml

.github/workflows/test-with-soroban-examples.yml

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,6 @@ jobs:
4242
matrix:
4343
working-directory: ${{ fromJSON(needs.collect-examples.outputs.dirs) }}
4444
experimental_spec_shaking_v2: [true, false]
45-
# Exclude examples that depend on a crates.io package whose own soroban-sdk
46-
# dependency is an incompatible major to the soroban-sdk under test. The
47-
# [patch.crates-io] step below redirects transitive soroban-sdk copies to the
48-
# local checkout, but Cargo only applies the patch when the local version
49-
# satisfies the requirement. privacy-pools pulls soroban-poseidon 25.0.0
50-
# (soroban-sdk ^25), which the local soroban-sdk (26.x) does not satisfy, so two
51-
# soroban-sdk copies are compiled and linking fails with a duplicate lang item
52-
# (panic_impl). https://github.com/stellar/rs-soroban-sdk/issues/1723
53-
exclude:
54-
- working-directory: privacy-pools
5545
defaults:
5646
run:
5747
working-directory: soroban-examples/${{ matrix.working-directory }}
@@ -82,6 +72,35 @@ jobs:
8272

8373
- uses: stellar/actions/rust-cache@main
8474

75+
- name: Align the local soroban-sdk version with the example
76+
working-directory: ${{ github.workspace }}
77+
run: |
78+
# The example pins soroban-sdk and may pull crates such as soroban-poseidon
79+
# from crates.io that depend on a specific soroban-sdk major. When the local
80+
# checkout has bumped to a newer major (for example a 27.0.0-rc release), the
81+
# [patch.crates-io] + `cargo update --precise` step below can't redirect those
82+
# transitive soroban-sdk edges, because Cargo only applies a patch when the
83+
# local version satisfies the requirement (for example soroban-poseidon's ^25
84+
# in privacy-pools). Relabel the local crates with the version the example
85+
# already resolves so the patch satisfies the requirement, collapsing every
86+
# soroban-sdk edge onto the local checkout's code regardless of the bump.
87+
dest_version=$(
88+
cargo metadata --manifest-path "soroban-examples/${{ matrix.working-directory }}/Cargo.toml" --format-version 1 \
89+
| jq -r '.packages[] | select(.name == "soroban-sdk") | .version' \
90+
| head -n1
91+
)
92+
local_version=$(
93+
cargo metadata --manifest-path rs-soroban-sdk/Cargo.toml --format-version 1 --no-deps \
94+
| jq -r '.packages[] | select(.name == "soroban-sdk") | .version'
95+
)
96+
echo "example soroban-sdk version: ${dest_version:?could not determine the example soroban-sdk version}"
97+
echo "local soroban-sdk version: $local_version"
98+
if [ "$dest_version" != "$local_version" ]; then
99+
escaped=$(printf '%s' "$local_version" | sed 's/[.]/\\./g')
100+
sed -i "s|\"$escaped\"|\"$dest_version\"|g" rs-soroban-sdk/Cargo.toml
101+
echo "Relabelled local rs-soroban-sdk crates from $local_version to $dest_version"
102+
fi
103+
85104
- name: Collect publishable rs-soroban-sdk crates
86105
run: |
87106
# Collect the publishable rs-soroban-sdk crates, their directories, and their
@@ -143,9 +162,10 @@ jobs:
143162
# checkout's version with `cargo update --precise`, so the transitive
144163
# edges move onto it. Pinning (rather than letting cargo pick the highest
145164
# compatible version) stops a newer *published* SDK from being chosen for a
146-
# transitive edge and re-splitting the graph. (Can't rescue an
147-
# incompatible-major transitive dep, so the matrix exclusion is still
148-
# needed.)
165+
# transitive edge and re-splitting the graph. (When the local checkout is
166+
# an incompatible major, the "Align the local soroban-sdk version with the
167+
# example" step above first relabels it to the example's version, so these
168+
# requirements stay satisfiable; see #1723.)
149169
workspace_root=$(cargo metadata --format-version 1 --no-deps | jq -r '.workspace_root')
150170
if [ -s "$RUNNER_TEMP/sdk-crates.tsv" ]; then
151171
# Don't emit a second [patch.crates-io] header if one already exists upstream.

0 commit comments

Comments
 (0)