Skip to content

fix(test): PolyVoiceTests is iOS-only and broke under @MainActor - #30

Merged
Zakariya1057 merged 1 commit into
mainfrom
fix/polyvoice-tests-mainactor
Jul 20, 2026
Merged

fix(test): PolyVoiceTests is iOS-only and broke under @MainActor#30
Zakariya1057 merged 1 commit into
mainfrom
fix/polyvoice-tests-mainactor

Conversation

@Zakariya1057

Copy link
Copy Markdown
Collaborator

main does not currently buildios-build-test fails on 72b54a9.

Tests/PolyVoiceTests is an iOS-only target. swift test on macOS never compiles it, and xcodebuild build only builds Sources/ — so making PolyCall / PolyVoice.call(...) @MainActor in #29 broke every call site in that suite with nothing local to catch it.

Fix: mark the suite @MainActor, matching the API it exercises.

Verification

Run exactly the way CI does:

xcodebuild -scheme PolyMessaging-Package \
  -destination "platform=iOS Simulator,id=<udid>" \
  -skipPackagePluginValidation test

282 PolyMessaging + 11 PolyVoice tests, 0 failures, TEST SUCCEEDED.

Why this slipped

The #if os(iOS) targets are invisible to the macOS toolchain. I checked Sources/ against a real iOS build but not Tests/, and the green swift test run was misleading — it silently skipped the whole target. Worth remembering that swift test passing says nothing about the iOS-only suites.

Blocks the v0.9.0 tag and the CocoaPods push.

`main` currently fails `ios-build-test` — it doesn't build.

Tests/PolyVoiceTests is an iOS-only target, so `swift test` on macOS never
compiles it. Making PolyCall/PolyVoice.call @mainactor in the previous commit
broke every call site in it, and nothing local caught that: the macOS suite
skips the target entirely, and `xcodebuild build` only builds Sources.

Marked the suite @mainactor, matching the API it exercises.

Verified the way CI actually runs it — `xcodebuild -scheme PolyMessaging-Package
-destination "platform=iOS Simulator" test`: 282 PolyMessaging + 11 PolyVoice
tests, 0 failures.
@Zakariya1057
Zakariya1057 merged commit 541e83a into main Jul 20, 2026
4 checks passed
@Zakariya1057
Zakariya1057 deleted the fix/polyvoice-tests-mainactor branch July 20, 2026 12:35
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