Repository navigation
ADFA-7200: Build sqlite-js 1.4.4, which has upstream #36 - #8
Merged
Merged
Conversation
Moves the package from 1.4.2-3 to 1.4.3, which adds #33 (sqlitejs_cancel_all, for apps that embed sqlite-js; not exported here), and carries upstream pull request #36 as 0001-*.patch until a release has it: - an error while building a call's arguments or a toArray() row fails the call, instead of running it with fewer arguments or a short row; - text that SQLite runs out of memory converting gives "out of memory" instead of crashing sqlite3; - js_create_scalar() and its siblings fail when the function cannot be stored in js_functions, for example on a read-only database. run-tests.sh gains three tests for the first and third, and expects js_version() 1.4.3. On a Linux host with /usr/bin/sqlite3 3.46.1, all 107 pass against 1.4.3 with the patch, and only the three new ones fail against 1.4.3 without it. The out-of-memory case needs a heap limit relative to the memory in use, which the shell cannot set; upstream's own test of it runs on the same patch in CodeOnTheGo's test.sh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vh2DAXGyHbMzjSsi2zbrkw
…ounding run-tests.sh's "memory held by a global counts until the global is cleared" failed on a Galaxy J7 (Android 9, arm), in 1.4.2-3 as well. The memory limit counts a block's usable size, and Android 9's 32-bit allocator (jemalloc) rounds a 60 MB block up to 64 MB (malloc_usable_size 67108864), the whole default limit. Nothing else could even be parsed until the block was collected. The test now holds 48 MB, an exact size class, so it checks what it is named for: 108 of 108 pass on the J7, and 107 of 107 on a Linux host. The README's Limits section says a large ArrayBuffer can count up to a quarter more than its length where the allocator rounds up. Revision 1, because the installed script and README changed and stage already has 1.4.3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vh2DAXGyHbMzjSsi2zbrkw
… measured The comment and the README said "Android 10 and older"; only Android 9 was measured. They now say "measured on a 32-bit Android 9 phone". "Up to a quarter" stays, now measured on that phone: malloc(32 MB + 4 KB) reports 40 MB usable (+25.0%), and malloc(8 MB + 4 KB) 10 MB (+24.9%). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vh2DAXGyHbMzjSsi2zbrkw
Upstream merged #36 and released it in 1.4.4, so the patch goes and the revision starts again. 1.4.4's sources are 1.4.3 with the patch applied, byte for byte, except SQLITE_JS_VERSION. AC2 now expects 1.4.4; the ADFA-7200 tests stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vh2DAXGyHbMzjSsi2zbrkw
This was referenced Nov 17, 2026
Daniel-ADFA
approved these changes
Nov 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ADFA-7200
Moves
sqlite-jsfrom 1.4.2-3 to 1.4.4. Upstream released 1.4.4 on 2026-11-21 with sqliteai/sqlite-js#36. CodeOnTheGo's AAR moves to it in CodeOnTheGo#2285.sqlitejs_cancel_all(), for apps that embed sqlite-js.sqlite3doesn't use it, and the package's version script keeps it unexported;build.sh's export check still allows only the two entry points.toArray()row, now fails the call. In 1.4.3 the function ran with fewer arguments or got a short row.sqlite3.js_create_scalarand its siblings now fail when they can't store the function injs_functions, for example on a read-only database. In 1.4.3 they reported success, and the function was gone in the next session.The build has no patch and no revision. 1.4.4's
src/sqlitejs.cis identical to 1.4.3 plus #36, and itssqlitejs.hdiffers from 1.4.3's only inSQLITE_JS_VERSION.run-tests.shgains three tests for the first and third, and expectsjs_version()to be 1.4.4. Both READMEs describe the two releases.Behaviour change to know about: a
js_create_*call whose write tojs_functionsfails for any reason, a busy or locked table included, now returns an error. The function is still registered on the connection for that session, but it won't be there when the database is reopened. In 1.4.3 the call reported success.Tests (Linux host,
/usr/bin/sqlite33.46.1,EXT= a host build of the source)toArray()calls return results instead of failing, and the store on a read-only database returns 0.run-tests.sh: it needs a heap limit relative to the memory in use, which the shell can't set. Upstream's own test of it runs in CodeOnTheGo'stest.sh, which crashes without that check.On phones
Installed with apt from the stage repo, running the package's own
run-tests.sh:Not tested yet: the 1.4.4 build on aarch64 hardware.
Memory test on 32-bit Android: "AC9: memory held by a global counts until the global is cleared" holds a 48 MB
ArrayBuffer, an exact jemalloc size class. The memory limit counts a block's usable size, and Android 9's 32-bit allocator (jemalloc) rounds a 60 MB block up to 64 MB (malloc_usable_size67,108,864), the whole default limit, so with 60 MB nothing else could even be parsed until the block was collected. The README's Limits section says a largeArrayBuffercan count up to a quarter more than its length where the allocator rounds up.Still to do: publish to production after review and merge.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Vh2DAXGyHbMzjSsi2zbrkw