Skip to content

fix(tests): restore FlipcashTests compilation under Xcode 27 main-actor isolation - #526

Merged
bmc08gt merged 1 commit into
mainfrom
fix/regression-test-main-actor
Jul 27, 2026
Merged

fix(tests): restore FlipcashTests compilation under Xcode 27 main-actor isolation#526
bmc08gt merged 1 commit into
mainfrom
fix/regression-test-main-actor

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Problem

The FlipcashTests bundle fails to link on main under Xcode 27 / Swift 6. The app module defaults to main-actor isolation, which makes app symbols such as StoredMintMetadata.metadata / StoredMintMetadata.init(_:) and URL.sanitizedForAnalytics main-actor-isolated. Four test suites referenced them from a nonisolated context, so they failed to compile — and a single failing file takes the whole test bundle down at link, blocking the entire suite from running.

Surfaced while verifying the tip-payload change (#523), whose TipCodeEncodingTests couldn't execute because of this.

Fix

Same root cause, minimal per-suite fixes:

  • Regression_69ea28b0, URLSanitizationTests, Database+MintUpsertTests — annotate the suite @MainActor (matching the convention already used by many suites in this target, e.g. ChatPreviewMappingTests, WithdrawViewModelTests).
  • ProfileCreationStateTests — its StubUploader was an actor, which cannot conform to the now-main-actor-isolated ProfilePictureUploading protocol. Converted to a @MainActor final class and dropped the now-needless awaits on its synchronous accessors. The suite is already @MainActor.

No test logic changed — these are compile-time isolation annotations only.

Testing

  • xcodebuild build-for-testing (iPhone 16 Pro sim) links the full FlipcashTests target again.
  • All four affected suites run green (26 cases): Regression_69ea28b0, ProfileCreationStateTests, URLSanitizationTests, DatabaseMintUpsertTests.

…or isolation

The module defaults to main-actor isolation under Swift 6 / Xcode 27, which
makes app symbols like StoredMintMetadata.metadata/.init and URL's
sanitizedForAnalytics main-actor-isolated. Four test suites referenced them
from a nonisolated context, failing to compile and taking the whole
FlipcashTests bundle down at link:

- Regression_69ea28b0, URLSanitizationTests, DatabaseMintUpsertTests:
  annotate the suite @mainactor (matching the convention already used across
  the test target).
- ProfileCreationStateTests: its StubUploader was an actor, which cannot
  conform to the now-main-actor-isolated ProfilePictureUploading protocol.
  Convert it to a @mainactor final class and drop the now-needless awaits on
  its synchronous accessors.

All four suites compile and pass; the test target builds and links again.
@bmc08gt
bmc08gt merged commit 62d7802 into main Jul 27, 2026
@bmc08gt
bmc08gt deleted the fix/regression-test-main-actor branch July 27, 2026 20:49
bmc08gt added a commit that referenced this pull request Jul 27, 2026
* origin/main:
  fix(tests): restore FlipcashTests compilation under Xcode 27 main-actor isolation (#526)
  chore(tips): remove profile photo from tip card setup for now (#522)
  feat(tips): open post-tip chats with the keyboard up (#524)
  feat(tips): use the minimized send button only in tip chats (#525)
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.

1 participant