Skip to content

Conversation

groue
Copy link
Owner

@groue groue commented Sep 9, 2025

This pull request adds a few SendableMetatype conformances that prevent isolated conformances of Swift 6.2 when they make no sense.

In particular, TableRecord does not support isolated conformances.

@groue groue force-pushed the dev/SendableMetaType branch 4 times, most recently from 262961a to c9fe1e0 Compare September 10, 2025 04:51
The error was:

> use of ‘@import’ in framework header is discouraged, including this header requires -fmodules

This commit applies the fix recommended at https://developer.apple.com/documentation/xcode/identifying-and-addressing-framework-module-issues
DatabaseAggregate does not support isolated conformances: it must be able to aggregate values whenever a database access is performed. This can happen in a nonisolated fashion.
ValueReducer does not support isolated conformances: it must be able to reduce observed values when needed. This can happen in a nonisolated fashion.
This is required because the value of databaseSelection is not required to be Sendable. This forces TableRecord.relationForAll to postpone the definition of the selection until we access the database - in a nonisolated fashion.
This allows us to apply the encoding strategies for Data, Date, UUID when we know we need it, i.e. when we know the primary key, and this happens when we access the database - in a nonisolated fashion.
In the iOS 26 simulator the demo app would show a flash of missing content.
@groue groue force-pushed the dev/SendableMetaType branch from c9fe1e0 to 7ec88b7 Compare September 10, 2025 05:13
@groue groue merged commit 7eea8cc into development Sep 10, 2025
8 checks passed
@groue groue deleted the dev/SendableMetaType branch September 10, 2025 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant