Conversation
This reverts commit 6c2e2c2.
There was a problem hiding this comment.
💡 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
| const handleFileChange = async (isManifestChange: boolean = false) => { | ||
| await buildMutex.runExclusive(async () => { | ||
| if (isManifestChange) { | ||
| await updateManifest() | ||
| } | ||
| await build() | ||
| }) | ||
| if (isManifestChange) { | ||
| await updateManifest() | ||
| } | ||
| await build() |
There was a problem hiding this comment.
[P1] Protect dev builds from concurrent rebuilds
Removing the Mutex from handleFileChange allows multiple file-change events to call build() in parallel. When two files are saved in quick succession, build() will call buildContext.rebuild() twice concurrently, which esbuild rejects with errors like Cannot start rebuild while another rebuild is running, leaving the dev server in a failed state until manually restarted. The reverted change serialized these operations; without it, normal editing can intermittently break the dev server.
Useful? React with 👍 / 👎.
Reverts #42