Fix review findings: exit codes, crash handler, locking, guards
Process lifecycle:
- Propagate worst worker exit code instead of always exit(0) — CI now
detects failed project builds
- Add daemonKilledByUs flag to suppress "exited unexpectedly" message
when the orchestrator intentionally kills the daemon
- Use process.once instead of process.on for signal/exit handlers to
prevent accumulation on reuse
- Skip --turbopack-daemon flag for webpack-only workers
Rust correctness:
- Add require_local() guards to project_trace_source,
project_get_source_for_asset, project_get_source_map — these were
routing to daemon which always returns "not implemented", now they
fail fast with a clear message
- ProjectOnExit: use atomic remove pattern (matching ProjectShutdown)
to eliminate TOCTOU race on concurrent calls
- project_on_exit_internal: graceful no-op on double call instead of
panic — can happen when both project_on_exit and project_shutdown
are called
Minor:
- Gate getProjectGroups() behind argv.includes check to avoid
unconditional require on every next dev/build
- Fix rootPath computed twice in turbopack-analyze
- Add explanatory comments to cancel_subscription and run_daemon_server
Co-Authored-By:
Claude <noreply@anthropic.com>
Showing
Please
register
or
sign in
to comment