Replace CheckoutConfigurable runtime casts with a configuration requirement - #779
Draft
tiagocandido wants to merge 1 commit into
Conversation
11 tasks
tiagocandido
added this pull request to stack #781
September 16, 2026 08:58
tiagocandido
removed this pull request from stack #781
September 16, 2026 12:13
…rement CheckoutConfigurable's modifier defaults downcast self to ShopifyCheckout and silently returned other conformers unchanged. The protocol now requires a mutable configuration, so the shared helper copies self and updates it without casts, and modifiers work for any value-semantic conformer. ShopifyCheckout.configuration becomes public to satisfy the requirement; the public API baseline is regenerated accordingly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Assisted-By: devx/b61614bc-75f6-4454-beb1-4d30f281e365
tiagocandido
force-pushed
the
tiagosantos/09-15-checkoutconfigurable-configuration-requirement
branch
from
September 16, 2026 12:32
e87eb38 to
278c84f
Compare
tiagocandido
changed the base branch from
kieran-osgood/08-20-fixswiftuimodifiersshouldbeinstancescoped
to
preload-configuration-invalidation
September 16, 2026 12:32
tiagocandido
added this pull request to stack #725
September 16, 2026 12:33
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.
Stack
Top to bottom:
What changes are you making?
Follow-up to #681. The
CheckoutConfigurablemodifier defaults downcastselftoShopifyCheckoutand silently returned any other conformer unchanged. The protocol now requiresvar configuration: ShopifyCheckoutKit.Configuration { get set }, so the shared helper copiesselfand updates the copy's configuration without casts — modifiers work for any value-semantic conformer, and chaining, value semantics, and isolation from the global configuration are unchanged.Two deliberate public API changes, acceptable in the 4.0 prerelease: any external conformer now gets a compile error until it stores a configuration (instead of a silent no-op), and
ShopifyCheckout.configurationbecomes public with a settable value. The API baseline is regenerated for both.How to test
Run the Swift package tests.
testModifiersApplyToAnyConformerWithoutCastscovers a test-local conformer receiving all five modifiers; the existingCheckoutConfigurableTestscoverShopifyCheckoutcapture and global-config isolation. The public API baseline check passes against the committed baselines.Before you merge
Important
platforms/swift/README.mdand/orplatforms/android/README.md) — no README change needed here; the modifier docs stay accurate. Preload documentation lands in the stacked PR above.Releasing a new Swift version?
ShopifyCheckoutKit.podspecplatforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swiftplatforms/swift/README.md(major version only)Releasing a new Embedded Checkout Protocol version?
embeddedCheckoutProtocolAndroidinplatforms/android/gradle/libs.versions.tomlprotocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.apiif the public API changedReleasing a new Android version?
checkoutKitAndroidinplatforms/android/gradle/libs.versions.tomlplatforms/android/README.md🤖 Generated with Claude Code