-
Notifications
You must be signed in to change notification settings - Fork 368
fix(llc): Fixed build in dart2wasm environment #2379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export 'stream_attachment_handler_base.dart' | ||
if (dart.library.html) 'stream_attachment_handler_html.dart' | ||
if (dart.library.js_interop) 'stream_attachment_handler_html.dart' | ||
xsahil03x marked this conversation as resolved.
Show resolved
Hide resolved
|
||
if (dart.library.io) 'stream_attachment_handler_io.dart' | ||
show StreamAttachmentHandler; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export 'unsupported_db.dart' | ||
if (dart.library.io) 'native_db.dart' // implementation using dart:io | ||
if (dart.library.html) 'web_db.dart'; | ||
if (dart.library.js_interop) 'web_db.dart'; | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainGood switch; confirm web_db.dart is Wasm‑safe (no dart:html or non‑Wasm APIs). If web_db.dart still uses dart:html or html-only storage APIs, this gate will break Wasm. Ensure it uses the Wasm-friendly drift/web/wasm path. 🏁 Script executed: #!/bin/bash
# Ensure persistence web impl avoids dart:html
rg -nC2 -e "^import\s+['\"]dart:html['\"]" packages/stream_chat_persistence/lib/src/db/shared/web_db.dart || true
# Grep for drift wasm/web connectors (adjust patterns to your impl)
rg -nC2 -e "drift.*wasm" -e "import\s+['\"][^'\"]*drift/web" packages/stream_chat_persistence/lib/src/db/shared/web_db.dart || true Length of output: 273 Do not approve — web_db.dart is not Wasm-safe; implement a Wasm connector packages/stream_chat_persistence/lib/src/db/shared/web_db.dart still imports 'package:drift/web.dart' and has "// TODO: Replace with WASM implementation"; this uses web-only APIs and will break the Wasm gate. Replace with a Wasm-friendly connector (e.g., drift/web/wasm) or a drift wasm implementation that avoids dart:html, then re-verify.
xsahil03x marked this conversation as resolved.
Show resolved
Hide resolved
|
Uh oh!
There was an error while loading. Please reload this page.