fix(ios): clean up Swift 6 build warnings and actor isolation in driver streaming#1174
Merged
Merged
Conversation
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.
Summary
Five small build issues that surfaced (warnings + one Swift 6 strict-concurrency error). All low risk, mechanical fixes.
ConnectionCoordinator: unused
sessionbindingswitchDatabase(to:)didguard let session, ...but never readsessiondirectly — the function usesappState.connectionManager.session(for:)to fetch a fresh handle later. The binding was a nil-check disguised as a let. Replaced withguard session != nil.Three drivers:
tryon non-throwing callMySQLDriver,PostgreSQLDriver,SQLiteDriverall callactor.fetchNextRow(options:columns:)fromexecuteStreaming. The actor method signature returns[Cell]?withoutthrows, sotry awaitis a no-op. Swift 6 warns "No calls to throwing functions occur within 'try' expression". Drop thetry.StreamingExporter: actor-isolated
fileExtensionExportFormat.fileExtensionextension is defined inStreamingExporter.swiftat file scope. Under Swift 6 the file scope inherits the module's default isolation (MainActor in this build), so the extension property became MainActor-isolated.actor StreamingExporterthen can't read it withoutawait. Mark the propertynonisolatedsince it's a pure pattern-match with no shared state.Test plan