Skip to content

SQLCipher build hook#375

Merged
simolus3 merged 39 commits into
simolus3:sqlcipherfrom
davidmartos96:sqlcipher_pr
Jun 1, 2026
Merged

SQLCipher build hook#375
simolus3 merged 39 commits into
simolus3:sqlcipherfrom
davidmartos96:sqlcipher_pr

Conversation

@davidmartos96
Copy link
Copy Markdown
Contributor

@davidmartos96 davidmartos96 commented May 21, 2026

Questions:

Should we reuse the download_sqlite and build_sqlite jobs?

Regarding build flags, what should we use as default?

  1. The same ones as the current build hook + minimal extra required flags
  2. The same set of build flags that the SQLCipher community build includes https://github.com/sqlcipher/sqlcipher-android/blob/7fab57af75039e5004b087086142b11a9d2a2380/sqlcipher/src/main/jni/sqlcipher/Android.mk#L9

build for macOS

openssl build

android support

sqlcipher output

support ios

disable linux 32 bits

format

fix download

skip tests

lint

fix analyze

no analyze

no sanitizer build

cleanup

targetos

crypto switch

link with common crypto on macos/ios

support tar xz

build for iOS

version 3.3.0

Revert "version 3.3.0"

This reverts commit 4eb21c0.

sqlite3-sqlcipher tag

errata

only prepare release

link android log

good hashes

ignore wasm test

allow prebuilt sqlcipher

hashes

hashes

trigger deploy

hashes

whitespace

cleanup
@davidmartos96 davidmartos96 marked this pull request as draft May 21, 2026 17:21
@davidmartos96
Copy link
Copy Markdown
Contributor Author

@simolus3 , I left a few general questions about how to aproach the PR

@davidmartos96
Copy link
Copy Markdown
Contributor Author

@simolus3 This is ok to review now. But it appears to be stuck in the integration tests, but I'm not sure why, as I haven't touched those.

@davidmartos96 davidmartos96 marked this pull request as ready for review May 22, 2026 10:53
Copy link
Copy Markdown
Owner

@simolus3 simolus3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we reuse the download_sqlite and build_sqlite jobs?

Yes, download_sqlite should also download OpenSSL and SQLCipher sources. build_sqlite should also build SQLCipher.

Regarding build flags, what should we use as default?

Using options from our current build hook + the extra init/shutdown flags sounds correct to me. There's no reason to enable fts4 or extension loading through SQL functions.

Comment thread sqlite3/hook/build.dart Outdated
Comment thread sqlite3/lib/src/hook/asset_hashes.dart
Comment thread sqlite3/lib/src/hook/openssl.dart Outdated
Comment thread sqlite3/lib/src/hook/openssl.dart Outdated
Comment thread tool/build_sqlite.dart Outdated
@davidmartos96
Copy link
Copy Markdown
Contributor Author

@simolus3 I'm not able to change the target branch without creating a new PR. Are you able to change it as admin?

@simolus3 simolus3 changed the base branch from main to sqlcipher May 30, 2026 09:23
Copy link
Copy Markdown
Owner

@simolus3 simolus3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the help! This is definitely helpful, I can still look at Windows and non-X64 Linux support before merging and releasing the sqlcipher branch.

flutter test integration_test -Dsqlite3.sqlcipher=true
flutter test integration_test -Dsqlite3.sqlcipher=true -d macos

- name: sqlcipher Android emulator tests
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Booting an emulator is quite slow. I wonder if the Android emulator tests should be a separate job now, where we might spawn a single Android emulator only and use a script: that runs multiple flutter test calls with different build options in sequence?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Should we create a bash script for the ci tests? Or would you like placing the "&&"s in the workflow yaml directly?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Directly in the yaml should work

Comment thread sqlite3/hook/build.dart
@@ -60,15 +60,70 @@ ${usedSqliteSymbols.map((symbol) => ' $symbol;').join('\n')}
}

final isSqlcipher = input.userDefines['is_sqlcipher'] as bool? ?? false;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm to blame for this, but there should be a comment here explaining that these options are internal, undocumented and only meant to be set via tool/build_sqlite.dart

Comment thread sqlite3/hook/build.dart
Comment thread sqlite3/lib/src/hook/description.dart
@davidmartos96
Copy link
Copy Markdown
Contributor Author

Thanks for the help! This is definitely helpful, I can still look at Windows and non-X64 Linux support before merging and releasing the sqlcipher branch.

I would appreciate if you look into the Windows and Linux Cross Compiling. I'm not very experienced with the build tools for those

@simolus3
Copy link
Copy Markdown
Owner

simolus3 commented Jun 1, 2026

I'll merge this as-is since it's a clear improvement. Thanks for your help, I'll look into the cross-compiling issues too.

@simolus3 simolus3 merged commit 9f6b989 into simolus3:sqlcipher Jun 1, 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.

2 participants