feat(js_run_devserver): notify after runfiles sync - #2964
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f1b569eb6
ℹ️ 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".
| if (chunkString.includes('IBAZEL_BUILD_COMPLETED SUCCESS')) { | ||
| if (notifyRunfilesChanges) { | ||
| pendingBuildCompleted = chunkString | ||
| return |
There was a problem hiding this comment.
Fall back when iBazel omits the v1 event
When notify_runfiles_changes is enabled with an older iBazel version that recognizes ibazel_notify_changes but not ibazel_notify_changes_v1, this branch buffers every legacy success marker and returns, while syncBuild is invoked only if a structured event later arrives. No such event will arrive in that environment, so incremental outputs remain stale and the child never receives IBAZEL_BUILD_COMPLETED SUCCESS; preserve legacy synchronization, fail fast on an unsupported protocol, or add a bounded fallback instead of waiting indefinitely.
Useful? React with 👍 / 👎.
Why
js_run_devservercopies runfiles into a sandbox. iBazel'snotify_changes_v1reports workspace changes before that copy finishes, so dev servers cannot safely use those paths for HMR.What
Adds opt-in
notify_runfiles_changessupport:ibazel_notify_changes_v1JS_RUN_DEVSERVER_SYNCEDafter sync, with added, changed, and deleted sandbox paths plus the triggering iBazel eventJS_RUN_DEVSERVER_NOTIFY_RUNFILES_CHANGES=1for the child processExisting targets keep legacy behavior unless they opt in.
Test