Skip to content

fix(ios): clean up Swift 6 build warnings and actor isolation in driver streaming#1174

Merged
datlechin merged 1 commit into
mainfrom
fix/build-warnings-and-actor-isolation
May 9, 2026
Merged

fix(ios): clean up Swift 6 build warnings and actor isolation in driver streaming#1174
datlechin merged 1 commit into
mainfrom
fix/build-warnings-and-actor-isolation

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

Five small build issues that surfaced (warnings + one Swift 6 strict-concurrency error). All low risk, mechanical fixes.

ConnectionCoordinator: unused session binding

switchDatabase(to:) did guard let session, ... but never read session directly — the function uses appState.connectionManager.session(for:) to fetch a fresh handle later. The binding was a nil-check disguised as a let. Replaced with guard session != nil.

Three drivers: try on non-throwing call

MySQLDriver, PostgreSQLDriver, SQLiteDriver all call actor.fetchNextRow(options:columns:) from executeStreaming. The actor method signature returns [Cell]? without throws, so try await is a no-op. Swift 6 warns "No calls to throwing functions occur within 'try' expression". Drop the try.

StreamingExporter: actor-isolated fileExtension

ExportFormat.fileExtension extension is defined in StreamingExporter.swift at 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 StreamingExporter then can't read it without await. Mark the property nonisolated since it's a pure pattern-match with no shared state.

Test plan

  • Build: zero warnings/errors from the listed files
  • Run a streaming export (CSV / JSON / SQL) end-to-end - file generated with correct extension
  • Switch databases on a MySQL / PostgreSQL connection - works as before
  • Run a SELECT that streams >100 rows on each driver - rows arrive in order

@datlechin datlechin merged commit 8011471 into main May 9, 2026
2 checks passed
@datlechin datlechin deleted the fix/build-warnings-and-actor-isolation branch May 9, 2026 20:07
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