From: stephan Date: Tue, 23 Jun 2026 19:49:09 +0000 (+0000) Subject: Add preprocessor guards to various JS files working towards the ability to build... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a47103453faea36eb7865f4d8f69c8384a550840;p=thirdparty%2Fsqlite.git Add preprocessor guards to various JS files working towards the ability to build, e.g., with only one of various VFSes included. The makefile does not yet integrate these - this is an incremental step towards addressing the discussion in [https://github.com/sqlite/sqlite-wasm/pull/168|the downstream npm project's PR#168]. FossilOrigin-Name: 9b9b0b733a1f61ea78954f264da5030dc54f8f6a31f99561de79dcb9493d936a --- diff --git a/ext/wasm/api/sqlite3-vfs-kvvfs.c-pp.js b/ext/wasm/api/sqlite3-vfs-kvvfs.c-pp.js index 99cee7f18d..4e94f3c8a4 100644 --- a/ext/wasm/api/sqlite3-vfs-kvvfs.c-pp.js +++ b/ext/wasm/api/sqlite3-vfs-kvvfs.c-pp.js @@ -18,7 +18,7 @@ Documentation home page: https://sqlite.org/wasm */ -//#if omit-kvvfs +//#if target:node or omit-kvvfs globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){ /* These are JS plumbing, not part of the public API */ delete sqlite3.capi.sqlite3_kvvfs_methods; diff --git a/ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js b/ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js index af6ef4d7a3..2e0b6ccbf4 100644 --- a/ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js +++ b/ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js @@ -1,4 +1,4 @@ -//#if not target:node +//#if not target:node and not omit-opfs-sahpool /* 2023-07-14 @@ -44,6 +44,9 @@ - Also because of that, it does not require the SharedArrayBuffer, so can function without the COOP/COEP HTTP response headers. + - Also because of that, this one is much faster and the performance + gap increases as the job sizes increase. + - It can hypothetically support Safari 16.4+, whereas the "opfs" VFS requires v17 due to a subworker/storage bug in 16.x which makes it incompatible with that VFS. @@ -1463,4 +1466,4 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){ The OPFS SAH Pool VFS parts are elided from builds targeting node.js. */ -//#/if target:node +//#/if global snip diff --git a/ext/wasm/api/sqlite3-vfs-opfs-wl.c-pp.js b/ext/wasm/api/sqlite3-vfs-opfs-wl.c-pp.js index a3baee4269..4d4ed44343 100644 --- a/ext/wasm/api/sqlite3-vfs-opfs-wl.c-pp.js +++ b/ext/wasm/api/sqlite3-vfs-opfs-wl.c-pp.js @@ -1,4 +1,4 @@ -//#if not target:node +//#if not target:node and not omit-opfs-wl /* 2026-02-20 @@ -125,4 +125,4 @@ globalThis.sqlite3ApiBootstrap.initializersAsync.push(async (sqlite3)=>{ }); }); }/*sqlite3ApiBootstrap.initializers.push()*/); -//#/if target:node +//#/if global snip diff --git a/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js b/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js index 8edfab4dab..8687302161 100644 --- a/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js +++ b/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js @@ -1,4 +1,4 @@ -//#if not target:node +//#if not target:node and not omit-opfs /* 2022-09-18 @@ -177,4 +177,4 @@ globalThis.sqlite3ApiBootstrap.initializersAsync.push(async (sqlite3)=>{ }) }); }/*sqlite3ApiBootstrap.initializers.push()*/); -//#/if target:node +//#/if global snip diff --git a/ext/wasm/api/sqlite3-vtab-helper.c-pp.js b/ext/wasm/api/sqlite3-vtab-helper.c-pp.js index 80f4bfac23..317f251cbe 100644 --- a/ext/wasm/api/sqlite3-vtab-helper.c-pp.js +++ b/ext/wasm/api/sqlite3-vtab-helper.c-pp.js @@ -1,3 +1,4 @@ +//#if not omit-vtab /* ** 2022-11-30 ** @@ -426,3 +427,4 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){ return vtab.setupModule.call(this, opt); }; }/*sqlite3ApiBootstrap.initializers.push()*/); +//#/if global snip diff --git a/manifest b/manifest index 65f70de8e3..5970d64fe9 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\ssqlite3_backup_init()\sto\scorrectly\shandle\sthe\scase\swhere\sopening\sthe\stemp\sdatabase\sfails. -D 2026-06-23T19:46:48.852 +C Add\spreprocessor\sguards\sto\svarious\sJS\sfiles\sworking\stowards\sthe\sability\sto\sbuild,\se.g.,\swith\sonly\sone\sof\svarious\sVFSes\sincluded.\sThe\smakefile\sdoes\snot\syet\sintegrate\sthese\s-\sthis\sis\san\sincremental\sstep\stowards\saddressing\sthe\sdiscussion\sin\s[https://github.com/sqlite/sqlite-wasm/pull/168|the\sdownstream\snpm\sproject's\sPR#168]. +D 2026-06-23T19:49:09.728 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea @@ -601,11 +601,11 @@ F ext/wasm/api/sqlite3-api-worker1.c-pp.js 1fa34e9b0e3b90a8898e4f700d7125e44c818 F ext/wasm/api/sqlite3-license-version-header.js 98d90255a12d02214db634e041c8e7f2f133d9361a8ebf000ba9c9af4c6761cc F ext/wasm/api/sqlite3-opfs-async-proxy.c-pp.js 25e31482b04293a33d7599f1459eb552b3eb36ca10c02c816122d3308bf80cb2 F ext/wasm/api/sqlite3-vfs-helper.c-pp.js 3f828cc66758acb40e9c5b4dcfd87fd478a14c8fb7f0630264e6c7fa0e57515d -F ext/wasm/api/sqlite3-vfs-kvvfs.c-pp.js 96f79583dc12f836eadf3c6430a0beaed859306b67e8fd7b0fada8d22cc2393f -F ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js 4325cb9a5ebfbff7cd3060e309b167116a2a1bcb9f8d69dd8e6d023dbdd783bb -F ext/wasm/api/sqlite3-vfs-opfs-wl.c-pp.js 3dbd918ef037cd8fa9c7b4dccb3c8637b228638654c429e7df6acab5981c75e2 -F ext/wasm/api/sqlite3-vfs-opfs.c-pp.js 3da8fe72dc9e76614a9c102b92e777ce03f81d788b607701c828d8fcbac44b06 -F ext/wasm/api/sqlite3-vtab-helper.c-pp.js 366596d8ff73d4cefb938bbe95bc839d503c3fab6c8335ce4bf52f0d8a7dee81 +F ext/wasm/api/sqlite3-vfs-kvvfs.c-pp.js 021e6b07d12d93b061de2681a225cd709eccb7e59271342ef7731b637cb714a2 +F ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js 91f864f95c7195378b968cd4612e54b294e2e0445125a15f8626139de39c0462 +F ext/wasm/api/sqlite3-vfs-opfs-wl.c-pp.js 60fa106fc11d31adb1773ac16dd60fc9335a35496b0ca7bab8b4032cb61a441b +F ext/wasm/api/sqlite3-vfs-opfs.c-pp.js 5dd8410121acf623ce53005a4aab2c7b2b7f5d1ad072f69ebc208882bc7b7236 +F ext/wasm/api/sqlite3-vtab-helper.c-pp.js c67d92bc65b02a7af85b03dca06a62a82a9582af7235da7fe59a66aca783434e F ext/wasm/api/sqlite3-wasm.c 0bcc42b1faff0e4543bba1b595fe9cfde80e0c29e3abc475bce725f2a326a8e5 F ext/wasm/api/sqlite3-worker1-promiser.c-pp.js 46919740f8176c10f691431a81c769c35657e3b537e2ed2bde691f9017b0ee8a F ext/wasm/api/sqlite3-worker1.c-pp.js 21b20d3b8d43471d1647123616a7e5435b1e4b6fa447714f91ffc7f950ea01e8 @@ -2208,8 +2208,8 @@ F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee F tool/warnings.sh a554d13f6e5cf3760f041b87939e3d616ec6961859c3245e8ef701d1eafc2ca2 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f F tool/winmain.c 00c8fb88e365c9017db14c73d3c78af62194d9644feaf60e220ab0f411f3604c -P e58d5efc7b3387566661475e1a9afb6b94388a835cfb178999603135d57280fa -R df60cc2defed7e9cd1ad0e00165cde93 -U dan -Z c2c68d227570b5b89e22d4c92e5142dd +P c08bb97f399447be767ca2932858d88db5c1ba6ba29a68b1def23957206f9883 +R b3ac88a5678b01ffa85eceeb770ac32a +U stephan +Z a5d0dd9b1806cc487dc0023170559c36 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 9b3fb51fba..4055ffc8f7 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -c08bb97f399447be767ca2932858d88db5c1ba6ba29a68b1def23957206f9883 +9b9b0b733a1f61ea78954f264da5030dc54f8f6a31f99561de79dcb9493d936a