Skip to content

Conversation

simolus3
Copy link
Contributor

When loading the extension, this compares the running SQLite version against the minimum one we expect (3.44.0). When it's older, we abort loading the extension with a descriptive error message:

SQLite version 3.41.0 2023-02-21 18:09:37
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .load target/debug/libpowersync.dylib
Error: error during initialization: Could not initialize PowerSync: Version 0.4.2 of the PowerSync SQLite extension requires SQLite version number 3044000 or later, but was loaded against 3.41.0 (3041000)

This also expands Dart tests to:

  1. Run on macOS as well
  2. Test with a recent (3.50.2) and the minimum (3.44.0) SQlite version. I've copied a script from drift to download both of them, and set up a cache to not do that every time.

Finally, I've updated the sqlite version used to build the shell.

@simolus3 simolus3 requested a review from rkistner July 10, 2025 09:55
rkistner
rkistner previously approved these changes Jul 10, 2025
@simolus3 simolus3 merged commit 262a934 into main Jul 10, 2025
21 checks passed
@simolus3 simolus3 deleted the sqlite-version-check branch July 10, 2025 10:55
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