Skip to content

Shake by the recorded version - #2720

Draft
leighmcculloch wants to merge 32 commits into
patch-xdr-and-spec-cratesfrom
reduce-spec-markers-on-build
Draft

leighmcculloch wants to merge 32 commits into
patch-xdr-and-spec-cratesfrom
reduce-spec-markers-on-build

Conversation

@leighmcculloch

@leighmcculloch leighmcculloch commented Sep 5, 2026 •

Copy link
Copy Markdown
Member

What

Patch in the soroban-sdk change that shakes specs by reachability (stellar/rs-soroban-sdk#2043), announce SOROBAN_SDK_BUILD_SYSTEM_SUPPORTS_SPEC_SHAKING_V3 to the SDK alongside the existing v2 var, and pick the shaking rules from the rssdk_spec_shaking version the built wasm records rather than from a single fixed set of rules.

Why

Each var names a set of shaking rules, and this CLI announces every set it can apply, because the SDK refuses to build a contract whose rules the build system has not claimed. The v3 var is required by that SDK: from that version most types carry no marker, and a build system has to shake them out by following the references to them instead, so one announcing only v2 would shake by markers alone and strip every type. The v2 var stays set because it is still true of this CLI, and a contract built against an older published SDK looks for that var alone and refuses to build without it.

Which rules apply to a given wasm is a property of that contract, not of the CLI — it may have been built long before this version — so the CLI reads the version the contract recorded and passes it to soroban_spec::shaking::filter: version 2 keeps an entry only if it carries a marker, version 3 also follows the references from functions, events, and types, and a wasm recording no version at all is left unshaken.

Known limitations

Contract fixtures built by the tests resolve soroban-sdk from crates.io rather than through the workspace patch, so they cover the version 2 path and the SDK's own end-to-end test contract covers version 3. The [patch.crates-io] git revisions are replaced with published versions once stellar/rs-stellar-xdr#566 and the soroban-sdk stack land and release.

@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Sep 5, 2026
@leighmcculloch leighmcculloch changed the title Announce spec shaking v3 to the SDK Support spec shaking v3 Sep 5, 2026
@leighmcculloch leighmcculloch changed the title Support spec shaking v3 Shake specs by the version the wasm records Sep 5, 2026
@leighmcculloch leighmcculloch changed the title Shake specs by the version the wasm records Shake specs by reachability and markers Sep 5, 2026
@leighmcculloch leighmcculloch changed the title Shake specs by reachability and markers Announce spec shaking v3 and shake by the recorded version Sep 5, 2026
@leighmcculloch leighmcculloch changed the title Announce spec shaking v3 and shake by the recorded version Shake by the recorded version Sep 8, 2026
@leighmcculloch
leighmcculloch added this pull request to stack #2726 September 16, 2026 11:30
@leighmcculloch
leighmcculloch force-pushed the reduce-spec-markers-on-build branch from 33ae6c6 to e9f8699 Compare September 23, 2026 07:01
@leighmcculloch
leighmcculloch removed this pull request from stack #2726 September 23, 2026 08:20
@leighmcculloch
leighmcculloch added this pull request to stack #2750 September 23, 2026 08:21
@leighmcculloch
leighmcculloch force-pushed the reduce-spec-markers-on-build branch 2 times, most recently from 17bb1ec to f1baa27 Compare September 23, 2026 10:16
@leighmcculloch
leighmcculloch force-pushed the reduce-spec-markers-on-build branch from f1baa27 to d97a38d Compare September 23, 2026 10:41
@leighmcculloch
leighmcculloch force-pushed the reduce-spec-markers-on-build branch from b8112e0 to 823914f Compare September 24, 2026 08:07
@willemneal

Copy link
Copy Markdown
Contributor

The title of this PR has popped up a couple times now and I can't not think of it being about dancing to a recorded version.

@leighmcculloch
leighmcculloch force-pushed the reduce-spec-markers-on-build branch from a08d172 to 3686495 Compare September 24, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog (Not Ready)

Development

Successfully merging this pull request may close these issues.

2 participants