Shake by the recorded version - #2720
Draft
leighmcculloch wants to merge 32 commits into
Draft
leighmcculloch wants to merge 32 commits into
leighmcculloch wants to merge 32 commits into
Conversation
3 tasks
This was referenced Sep 5, 2026
leighmcculloch
added this pull request to stack #2726
September 16, 2026 11:30
This was referenced Sep 22, 2026
leighmcculloch
force-pushed
the
reduce-spec-markers-on-build
branch
from
September 23, 2026 07:01
33ae6c6 to
e9f8699
Compare
leighmcculloch
removed this pull request from stack #2726
September 23, 2026 08:20
leighmcculloch
added this pull request to stack #2750
September 23, 2026 08:21
leighmcculloch
force-pushed
the
reduce-spec-markers-on-build
branch
2 times, most recently
from
September 23, 2026 10:16
17bb1ec to
f1baa27
Compare
leighmcculloch
force-pushed
the
reduce-spec-markers-on-build
branch
from
September 23, 2026 10:41
f1baa27 to
d97a38d
Compare
leighmcculloch
force-pushed
the
reduce-spec-markers-on-build
branch
from
September 24, 2026 08:07
b8112e0 to
823914f
Compare
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
force-pushed
the
reduce-spec-markers-on-build
branch
from
September 24, 2026 23:47
a08d172 to
3686495
Compare
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.
Note
Part of a stack of PRs listed here:
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_V3to the SDK alongside the existing v2 var, and pick the shaking rules from therssdk_spec_shakingversion 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.