Skip to content

fix(watcher): preserve native event delivery while JavaScript is blocked - #16106

Merged
stormslowly merged 4 commits into
mainfrom
codex/15947-1-watcher-delivery
Oct 28, 2026
Merged

stormslowly merged 4 commits into
mainfrom
codex/15947-1-watcher-delivery

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Native watcher notifications can be dropped while the JavaScript thread is blocked, or delivered to replacement callbacks from a later watch generation.

Changes

Queue raw and aggregate notifications for lossless, ordered delivery and share the binding callback conversion path. Includes the blocked-JavaScript and callback-generation regression from #15947.

Split from the combined implementation in #15947. Layer 1 of 5; merge bottom to top.

Validation

This is a content-preserving split of original head 54a878d2511814fbc2c7d522ebadd1fe37c13301. The final stack tree is byte-for-byte identical to that head, and each layer’s ancestry and patch boundaries were checked. Builds and runtime tests were not rerun for this split; the original combined-PR validation is historical evidence, not a test result for these individual layers. CI must validate each layer.

Review notes

The delivery queue is intentionally unbounded while JavaScript is blocked; callback exception and teardown behavior were not separately exercised in the original validation.

Stack

Merge bottom to top; each PR targets the previous layer.

  1. fix(watcher): preserve native event delivery while JavaScript is blocked #16106 — Native watcher delivery (this PR)
  2. fix(hmr): resolve Node hot updates from the output root #16107 — Node hot-update paths
  3. fix(hmr): wait for pending imports and status handlers before applying #16108 — HMR import/status barrier
  4. fix(css): preserve renderer-owned stylesheet nodes during HMR #16109 — CSS node ownership
  5. fix(lazy-compilation): reject imports after HMR failure #15947 — Lazy-import stabilization

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Deploying rspack with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2fa84d5
Status: ✅  Deploy successful!
Preview URL: https://3bce3b92.rspack-v2.pages.dev
Branch Preview URL: https://codex-15947-1-watcher-delive.rspack-v2.pages.dev

View logs

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing 2fa84d5 to fix: release updated allocative crates to resolve napi feature mismatch (#16171) by AsyncIter

❌ Size increased by 12.13KB from 67.73MB to 67.75MB (⬆️0.02%)

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Gzip Size Change Gzip Change
popular-libs 1.7 MB 536.3 KB 0 0
react-10k 5.4 MB 1.3 MB 0 0
react-1k 827.7 KB 225.2 KB 0 0
react-5k 2.6 MB 670.6 KB 0 0
ui-components 4.7 MB 1.4 MB 0 0

Generated by Rsdoctor GitHub Action

@codspeed

codspeed Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 57 untouched benchmarks
⏩ 47 skipped benchmarks1


Comparing codex/15947-1-watcher-delivery (2fa84d5) with main (f307a14)

Open in CodSpeed

Footnotes

  1. 47 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@guru-irl

Copy link
Copy Markdown
Contributor

@ScriptedAlchemy @stormslowly @chenjiahan can we get some movement on this one? I hit this in our apps too and I have a similar fix for it on my fork

@stormslowly

Copy link
Copy Markdown
Contributor

Queue raw and aggregate notifications for lossless, ordered delivery and share the binding callback conversion path. Includes the blocked-JavaScript and callback-generation regression from #15947.

OK, working on it now.

@stormslowly

Copy link
Copy Markdown
Contributor

👍

@stormslowly
stormslowly enabled auto-merge (squash) October 28, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

⌂ 换网址