Repository navigation
PE-9205: Remove the unused sqlite3.wasm from the web build - #2264
Conversation
web/sqlite3.wasm (1,348,108 bytes) ships in every deployment and
nothing loads it.
- No tracked file names it.
- In the whole dependency tree only package:drift/wasm.dart and
package:sqlite3/wasm.dart do, and nothing imports either. The web
database is WebDatabase from package:drift/web.dart, which runs on
sql.js and loads sql-wasm.wasm.
- A release build of dev compiles to a main.dart.js with no reference
to it, while the same build does reference worker.js, which shows the
check finds a real reference when there is one.
No visitor downloads it, because nothing requests it, so this is deploy
weight rather than page weight: every release uploads it, including the
copy production publishes to Arweave.
web/worker.js stays. It looked equally dead from inside this repo, but
ardrive_http runs requests through the isolated_worker package, which
spawns Worker('worker.js') from the web root at runtime
(isolated_worker_web_impl.dart:48). Deleting it would break HTTP on web.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017NRgRqqrM4sg2EeqbGJzff
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters: 1
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Visit the preview URL for this PR (updated for commit d1346e7): https://ardrive-web--pr2264-remove-dead-sqlite3-pz8qyqn7.web.app (expires Wed, 21 Oct 2026 04:59:31 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: a224ebaee2f0939e7665e7630e7d3d6cd7d0f8b0 |
…lite 165 commits of dev, six conflicts resolved by hand. - web/sqlite3.wasm: kept this branch's 697,758-byte build. Dev deleted the old, wrong-ABI file in #2264; the WASM database here needs the matching one. - sync_progress.dart: both sides add fields. Kept examinedDriveIds and dev's five progress counters, in the constructor and in copyWith. - sync_cubit.dart: kept this branch's per-drive skip ledger (_skipsByExaminedDrive) in place of dev's single _lastSyncSkippedEntityTxIdsByDrive, kept dev's _publishProgress and _emitIfOpen, and kept both flags in both sync methods: reachedTheEnd feeds the ledger, ranToCompletion feeds dev's sync history. All nine of dev's _recordSyncRun calls survive. - sync_repository.dart: examinedDriveIds is announced through dev's syncProgressController.raise, which only ever copies a progress, so the field survives. _syncDrive takes both syncDeep and dev's onMetadataFetchProgress, and both sync paths pass both. - new_button.dart: dev's restructured New menu, with this branch's gated Publish Drive State entry. Item counts match dev's exactly. - drive_detail_page.dart: dev's restructured overflow menu, with the gated Publish Drive State item re-inserted after Create Snapshot. Tests adapted to APIs dev changed since this branch was cut: driveIdsToRetry is onlyDriveIds; DriveDao.initVaults became private and automatic, so the explicit calls go; createDriveEntityHistoryFromTransactions takes onEntityFetched, which the composition test's stub did not match; and dev's New menu test now provides the ConfigService the publish entry reads, with the feature off as it ships. flutter analyze: no issues. Full suite: 3024 passed, 5 skipped, 0 failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017NRgRqqrM4sg2EeqbGJzff
web/sqlite3.wasm(1,348,108 bytes) ships in every deployment, and nothing loads it. Production serves it today atapp.ardrive.io/sqlite3.wasm.How that was established
package:drift/wasm.dartandpackage:sqlite3/wasm.dartname it, and nothing inlib/,packages/ortest/imports either. The web database isWebDatabasefrompackage:drift/web.dart(lib/models/database/web.dart), which runs on sql.js and loadssql-wasm.wasm.main.dart.jswith zero references tosqlite3.wasm. The same build contains the one reference toworker.js, which shows the check finds a real reference when one exists.No visitor downloads it, because nothing requests it, so this is deploy weight rather than page weight: each release uploads it, including the copy production publishes to Arweave.
Why
web/worker.jsstaysFrom inside this repo,
worker.jslooks equally dead. It is not.ardrive_httpruns requests through theisolated_workerpackage, which spawnsWorker('worker.js')from the web root at runtime (isolated_worker-0.1.1/lib/src/isolated_worker_web_impl.dart:48). Deleting it would break HTTP on web. An earlier note on #2196 had both files as unreferenced, from a search that covered this repo and not its dependencies.Interaction with #2197
#2197 replaces this file with a
sqlite3.wasmbuilt for the right ABI, because the SQLite drive state artifact needs one. When #2197 is rebased onto dev it will see a modify/delete conflict on this path, resolved by keeping #2197's version. This change is still right for dev in the meantime: the file it removes cannot load under the resolvedsqlite3: 2.4.2.🤖 Generated with Claude Code
https://claude.ai/code/session_017NRgRqqrM4sg2EeqbGJzff