bundler: route every cross-thread event to the bundle thread through one post() - #37997
Open
alii wants to merge 8 commits into
Open
bundler: route every cross-thread event to the bundle thread through one post()#37997alii wants to merge 8 commits into
alii wants to merge 8 commits into
Claude / Claude Code Review
completed
Aug 13, 2026 in 14m 5s
Code review found 3 potential issues
Found 5 candidates, confirmed 3. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 3 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/runtime/api/JSBundler.rs:1412-1413 |
Stale doc comments reference deleted on_resolve_async/on_load_async and __addError |
| 🟡 Nit | src/bundler/ParseTask.rs:44 |
Orphaned #[allow(non_snake_case)] after mod EventLoop deletion |
| 🟡 Nit | src/bundler/ServerComponentParseTask.rs:109-114 |
Stale comment references deleted on_complete/any_loop_mut |
Annotations
Check warning on line 1413 in src/runtime/api/JSBundler.rs
claude / Claude Code Review
Stale doc comments reference deleted on_resolve_async/on_load_async and __addError
Two doc comments in this file went stale with this PR: (1) the `bv2_mut` caller list at line 1413 still names `…__addError`, but `JSBundlerPlugin__addError` now calls `post::<Plugin…Settled>` directly and never reaches `bv2_mut`; (2) the NOTE at lines 1396-1398 still says Resolve/Load live in bun_bundler "so that BundleV2 can operate on them directly (`on_resolve_async`/`on_load_async`)" — both of those methods were deleted in this PR. Since this line was already edited to prune `on_notify_defer
Check warning on line 44 in src/bundler/ParseTask.rs
claude / Claude Code Review
Orphaned #[allow(non_snake_case)] after mod EventLoop deletion
The `#[allow(non_snake_case)]` here previously decorated `mod EventLoop`, which this PR deletes; it now attaches through the intervening comments to `pub enum ContentsOrFd`, where it's dead (enums don't trigger `non_snake_case`, and `src/bundler/lib.rs` already has a crate-level `#![allow(non_snake_case, ...)]`). Per REVIEW.md — "delete dead code in the same PR that makes it dead" — line 44 should be removed along with the module.
Check warning on line 114 in src/bundler/ServerComponentParseTask.rs
claude / Claude Code Review
Stale comment references deleted on_complete/any_loop_mut
This comment block (lines 104–111) still references `LinkerContext::any_loop_mut` and `on_complete`, both of which this PR removed from this code path — dispatch now goes through `crate::post::post`, and the identical block in `ParseTask.rs` was deleted. The fresh SAFETY comment at 112–113 already covers the invariant, so lines 104–111 can be dropped.
Loading