-
Notifications
You must be signed in to change notification settings - Fork 322
try hotreload fml #2664
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: canary
Are you sure you want to change the base?
try hotreload fml #2664
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
🌿 Preview your docs: https://boundary-preview-8eb02347-b635-4d6e-9fc1-2a3d2ee9f2d6.docs.buildwithfern.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Watch the bacon diagnostics file | ||
| diagnosticsWatcher = watch(diagnosticsFile, async (eventType) => { | ||
| if (eventType !== 'change') return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guard file watcher when diagnostics file is absent
The plugin calls fs.watch(diagnosticsFile, …) unconditionally. fs.watch throws ENOENT if the path does not yet exist, which is the normal state when a developer starts Vite before running watch-build.py the first time. In that situation the dev server will crash during startup and HMR never initialises. Creating the file if missing or watching its parent directory avoids the failure.
Useful? React with 👍 / 👎.
…st wasm bundle, but it still goes blank when eventlistener rerenders
|
🌿 Preview your docs: https://boundary-preview-ec11d865-5e6c-4413-82dd-39b4c64ca0d4.docs.buildwithfern.com |
Note
Introduces a Bacon-driven WASM rebuild + custom Vite HMR pipeline with error overlay, local WASM copying, and config/docs to enable fast Rust/WASM development in the Playground.
docs/hot-reload.mddetailing architecture and setup for Rust/WASM hot-reload.engine/baml-schema-wasm/bacon.tomlwithwatch-wasm-devjob.engine/baml-schema-wasm/watch-build.pyto serialize builds, write.wasm-build-status, and stream output..gitignorefor temp build files; addwasm-bindgen-clitomise.toml.typescript/apps/playground/plugins/vite-plugin-wasm-hmr.tswatching.wasm-build-status, sending HMR status/error overlays, and optionally copying built WASM locally.vite.config.tsto usewasmHmr, alias@gloo-ai/baml-schema-wasm-webto a local dist, copy WASM assets, tweak dev server headers/watch.atoms.ts(reload trigger scaffold) and keep WASM init; add global panic bridge wiring (UI can react to WASM panics).runtime_wasm/mod.rsand publisher; small UI/layout tweaks in fiddle app; commit diagnostic sample file underweb/.bacon-diagnostics.Written by Cursor Bugbot for commit b980167. This will update automatically on new commits. Configure here.