fix(ios): state the isolation of every plugin source the iOS app compiles - #2811
Merged
Conversation
…own isolation Claude-Session: https://claude.ai/code/session_01GdkP9Kj2oVdzM5acwU69A3
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.
mainis red on iOS Tests, and has been three times running for the same reason, one symbol at a time.The defect
The iOS app target sets
SWIFT_DEFAULT_ACTOR_ISOLATION: MainActor(TableProMobile/project.yml:146). It also compiles 20 source files that live underPlugins/and belong to a macOS plugin target, which sets nothing of the kind.So one file has two default isolations: nonisolated in the plugin,
@MainActorin the app. Every declaration in it that is not markednonisolatedis main-actor on iOS alone, and the first nonisolated caller that touches it fails:Nothing in the macOS build can see it, because the plugin compiles the same file correctly. The iOS job is the only thing that catches it, it runs only when a change touches an iOS path, and it reports one symbol at a time, so fixing the named symbol uncovers the next one. That is what happened:
quoteLiteralwas fixed, which exposedhasRangeTypes, which would have exposedFreeTDSErrorState.The fix
Two declarations were left, and both are here:
PostgreSQLCapabilities(the three failing properties), read from the already-nonisolatedPostgreSQLObjectQueriesFreeTDSErrorState, constructed atFreeTDSConnection.swift:25by anonisolated private let, so it is the next error rather than a hypothetical oneWhat stops it coming back
scripts/ci/check-ios-shared-isolation.pyreads the shared file list out ofTableProMobile/project.ymlrather than repeating it, so a file added to the iOS target is covered the moment it is added. It reports every top-level declaration that states no isolation of its own, runs in Repo Hygiene on Ubuntu in under a second, and needs no Xcode.Proven both ways: it passes on this branch, and re-removing
nonisolatedfromPostgreSQLCapabilitiesmakes it name that exact line and exit 1.The invariant is written up in
CLAUDE.mdbeside the others, including the related rule that a shared file must not reach into plugin-only code at all.Also here
A SwiftLint error that arrived with #2809 and fails
swiftlint lint --strictonmain: a blank line before the closing brace ofObjectCopyRowCopier.Verification
@MainActortype.PostgreSQLDriverandMSSQLDriverplugins both build.verify.sh build: PASS.swiftlint lint --strict: clean, which it is not onmain.actionlinton the changed workflow: clean.The iOS target itself cannot be built on this machine: the vendored
oracle-niocheckout fails first withunknown attribute 'usableFromInlinenonisolated'from its@TaskLocalmacro, which predates this branch and which CI's toolchain does not hit. CI is the check that matters, and the static guard is what makes the claim checkable without it.https://claude.ai/code/session_01GdkP9Kj2oVdzM5acwU69A3