next.js
65e4a5ed - next-napi-bindings: keep issue-backed client update errors recoverable (#100924)

Commit
3 days ago
next-napi-bindings: keep issue-backed client update errors recoverable (#100924) ## Summary When `node_modules/next` is briefly missing (e.g. during a concurrent package install), `get_next_package` emits a `MissingNextFolderIssue` and also returns an error. The server-changed subscription already handles this: it uses `strongly_consistent_catch_collectables` and reports the Issue. The client-changed subscription (`endpoint_client_changed_subscribe`) propagated the error instead, so `subscribe` turned it into a `TurbopackInternalError` and printed `FATAL: An unexpected Turbopack error occurred: Next.js package not found`. With this change, the client-changed subscription reads `endpoint_client_changed_with_issues_operation`, an operation that wraps `endpoint_client_changed_operation` with the error handling. On success it returns the client-changed `Completion` unchanged. On failure it reads that operation's issues using the endpoint's issue filter: if an Error-severity issue explains the failure, it returns a new `Completion`, because the server subscription already surfaces the Issue; other errors still propagate. Issues are read only on the failure path, so the success path still doesn't depend on them. The subscription itself only does a strongly consistent read of the wrapper, as before. `test/development/app-dir/concurrent-install` covers this scenario. ## Verification - `cargo clippy -p next-napi-bindings` <!-- NEXT_JS_LLM --> <!-- fleet 8482d6ce-bad2-4131-98e3-4a391357a1c9 --> --------- Co-authored-by: vercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com> Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com>
Author
Parents
Loading