Skip to content

SQLiteData linux fixes#459

Open
thinkpractice wants to merge 3 commits intopointfreeco:mainfrom
thinkpractice:grdb_linux_fixes
Open

SQLiteData linux fixes#459
thinkpractice wants to merge 3 commits intopointfreeco:mainfrom
thinkpractice:grdb_linux_fixes

Conversation

@thinkpractice
Copy link
Copy Markdown

SQLiteData Package fixes

  • Bumped version of GRDB to 7.10.0 in Package.swift that contains the fixes we made to make GRDB build on Linux again. No further changes were needed. By using this GRDB version SQLiteData builds under Linux

Changes to Unit Tests

After the above changes, the unit tests still fail to build. I changed the following to make them build:

  • Wrapped the following tests/helpers in a #if canImport(CloudKit) block as CloudKit is not available on Linux:
    • UnattachedSyncEngineTests.swift
    • SyncEngineTests
    • CloudKitTestHelpers.swift
    • A small part of Schema.swift that uses CloudKit/SyncEngine
    • UserDatabaseTests
  • Idem for PrimaryKeyMigrationTests, but not completely sure this was the right way to go. The tests fail to build because SQlite3 is not found on Linux. When wrapped in a canImport block several other constructs are not found on Linux. Either they are available in the SQLite3 package and we could find an equivalent on Linux to fix these tests. However, if they are also related to SyncEngine they should be ignored on Linux. I can't judge at this moment if this was the case.

After these changes all tests that are not ignored by these changes pass. I want to also look into bringing the CI back for Linux. @stephencelis already send me some info on that. Let me know if these changes are acceptable and whether I can improve some tests to make them work on Linux as well!

Tim De Jong added 3 commits May 5, 2026 16:50
… the fixes to make GRDB build again on Linux. Also wrap the CloudKit specific tests in a #if canImport(CloudKit) to ignore these tests on Linux
… SyncEngine. Ignore them also by adding an #if canImport(CloudKit) block.
@thinkpractice thinkpractice changed the title Grdb linux fixes SQLiteData linux fixes May 5, 2026
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