Clear first-party warnings from the cross-platform swift test job#25813
Merged
Conversation
The `swift test` job added in #25344 surfaces warnings the iOS app build hides — Xcode suppresses warnings from SPM package dependencies, and `WordPressCore` / `WordPressCoreTests` build in Swift 6 language mode. All three are dead code or a missing conformance, with no behavior change: - `UserService.fetchUsers()`: dead `await` on `sequenceWithEditContext`, which builds a `PaginationSequence` synchronously. - `WordPressClientFeatureTests`: three dead `try` on the non-throwing `WordPressClient(api:siteURL:)` initializer. - `MockWordPressClientAPI`: five mock executors subclass wordpress-rs's `@unchecked Sendable` base classes without restating the conformance, which Swift 6 requires. Correct for iOS too — same sources, same wordpress-rs binary, no platform conditionals.
Contributor
|
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 33319 | |
| Version | PR #25813 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | dcd758a | |
| Installation URL | 28t9dt935jmk0 |
Contributor
|
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 33319 | |
| Version | PR #25813 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | dcd758a | |
| Installation URL | 2cjg068q7f6vo |
crazytonyli
approved these changes
Jul 22, 2026
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.


Description
The cross-platform
swift testjob added in #25344 surfaces a handful of warnings that the iOS app build hides — Xcode suppresses warnings from SPM package dependencies, andWordPressCore/WordPressCoreTestsbuild in Swift 6 language mode (neither package sets.swiftLanguageMode(.v5)on them). This clears the first-party ones. All are dead code or a missing conformance — no behavior change.1. Dead
await—UserService.fetchUsers()users.sequenceWithEditContext(params:)builds aPaginationSequencesynchronously; theasync throwsis on iteration (for try await), not construction. Dropped theawait.2. Dead
try×3 —WordPressClientFeatureTestsWordPressClient(api:siteURL:)is non-throwing. Dropped the threetry; each test keeps its othertry await client.supports(…)calls, sothrowsstays justified.3. Missing
@unchecked Sendablerestatement ×5 —MockWordPressClientAPIThe five mock executors subclass wordpress-rs's
@unchecked Sendablebase classes; Swift 6 requires restating the conformance on the subclass. Their added stored properties (routes/isBlockTheme) are set-in-init and read-only, so@uncheckedis honest.All three are correct for iOS too — same sources, same
wordpress-rsbinary, no platform conditionals.The remaining
swiftsoup"unhandled files" warning is upstream and handled separately in #25811.Testing instructions
swift test(cross-platform package) — 128 tests pass and the three first-party warning classes above are gone. (The upstreamswiftsoupwarning still shows on this branch; UpdateSwiftSoupfrom2.7.5to2.13.6#25811 removes it.)WordPressCoreTestsruns in both).Related
swift testwarnings")SwiftSoupfrom2.7.5to2.13.6#25811 (SwiftSoup bump — the upstream warning)