Skip to content

Conversation

simolus3
Copy link
Contributor

@simolus3 simolus3 commented Sep 15, 2025

Release notes for the core extension: https://github.com/powersync-ja/powersync-sqlite-core/releases/tag/v0.4.6

This also prepares the adoption of a Kotlin SDK update to fix XCode 26 compatibility (powersync-ja/powersync-kotlin#260).
It also adds the getCrudTransactions API we've recently added to our other SDKs.

@simolus3
Copy link
Contributor Author

@stevensJourney I'm not sure what to do about the compiler errors with XCode 26. It complains about the override func __uploadData(database _: KotlinPowerSyncDatabase) async throws method on PowerSyncBackendConnectorAdapter("Non-Sendable parameter type 'any PowerSyncDatabase' cannot be sent from caller of superclass instance method '__uploadData(database:)' into nonisolated override").

Since we can't mark any PowerSyncDatabase (the Kotlin one) as sendable because it's an interface, I'm not sure we can fix this from Swift alone.

stevensJourney
stevensJourney previously approved these changes Sep 16, 2025
@stevensJourney
Copy link
Contributor

@stevensJourney I'm not sure what to do about the compiler errors with XCode 26. It complains about the override func __uploadData(database _: KotlinPowerSyncDatabase) async throws method on PowerSyncBackendConnectorAdapter("Non-Sendable parameter type 'any PowerSyncDatabase' cannot be sent from caller of superclass instance method '__uploadData(database:)' into nonisolated override").

Since we can't mark any PowerSyncDatabase (the Kotlin one) as sendable because it's an interface, I'm not sure we can fix this from Swift alone.

We don't actually use the KotlinPowerSyncDatabase in our override. Since we want to wrap and provide a Swift protocol for uploads. We could create a small helper on the Kotlin side which implements uploadData with another overrideable method like performUpload which does not require a parameter. e.g.

public class SwiftConnector : PowerSyncBackendConnector() {
    override suspend fun fetchCredentials(): PowerSyncCredentials? {
    }

    // Have Swift SDK overide this
    public suspend fun performUpload() {
    }

    override suspend fun uploadData(database: PowerSyncDatabase) {
        performUpload()
    }
}

@simolus3
Copy link
Contributor Author

Sounds good, I'll open a Kotlin PR for this 👍

@simolus3 simolus3 marked this pull request as draft September 16, 2025 08:12
@simolus3 simolus3 changed the title Update core extension to 0.4.6 Update Kotlin and core extension Sep 16, 2025
@simolus3 simolus3 marked this pull request as ready for review September 18, 2025 12:30
@simolus3 simolus3 merged commit 11def98 into main Sep 19, 2025
4 checks passed
@simolus3 simolus3 deleted the update-core branch September 19, 2025 07:51
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.

2 participants