v0.7.55: revert nextjs version bump - #6243
Conversation
waleedlatif1
commented
Aug 4, 2026
- fix(deps): revert next to 16.2.12, its 16.3.0 optimizer deletes live code (fix(deps): revert next to 16.2.12, its 16.3.0 optimizer deletes live code #6242)
…code (#6242) Next 16.3.0's Turbopack optimizer models a bare `return <asyncCall>()` tail call inside an async function as returning the promise object, then propagates that always-truthy fact through the caller's `await`. Where the result feeds an `if (x)` whose every branch returns, it concludes the branch is always taken and deletes everything after it from the emitted bundle. Two sites shipped to production that way: - `POST /api/credentials` lost its entire create path — the transaction, the org locks, the insert, the audit, the 201. A first-time create fell into the existing-credential branch and threw on `existingCredential.id`, so every new credential 500'd. - `upsertAsyncToolCall` collapsed to `async () => await getAsyncToolCall(id)`. The insert is simply gone; it returns null for every new async copilot tool call. Silent — no error, no failed request. A differential scan of 71,266 source string literals across `.next/server` and `.next/static`, comparing images built from the same commit on 16.2.12 and 16.3.0, found exactly these two and nothing else. That scan cannot see dropped branches with no distinctive string literal, which is why the version goes back rather than the two sites being patched alone. Both are also hardened with `return await`, verified to defeat the miscompile in a minimal reproduction. The TypeScript toolchain cleanup from the original bump (dropping @typescript/native-preview, `useTypeScriptCli`) is kept.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryHigh Risk Overview On 16.3.0, Turbopack’s optimizer mis-models bare
Reviewed by Cursor Bugbot for commit 2977db5. Configure here. |
Greptile SummaryThis PR reverts Next.js across the monorepo from 16.3.0 to 16.2.12 after an optimizer regression and adds defensive
Confidence Score: 5/5The PR appears safe to merge, with the dependency graph consistently reverted and the affected asynchronous persistence paths comprehensively protected. The manifests and lockfile resolve the reverted Next.js toolchain consistently, and all relevant changed wrappers now await the resolved database value without altering established error or cleanup behavior.
|
| Filename | Overview |
|---|---|
| apps/sim/app/api/credentials/route.ts | Adds explicit awaits to preserve resolved credential nullability through optimized production builds; no uncovered failure remains. |
| apps/sim/lib/copilot/async-runs/repository.ts | Consistently applies the async-tail-call workaround to traced database operations without changing their returned values or error handling. |
| apps/sim/next.config.ts | Updates explanatory comments while retaining configuration compatible with the reverted toolchain. |
| apps/sim/package.json | Pins the primary application to Next 16.2.12 consistently with root overrides and lockfile resolution. |
| apps/docs/package.json | Aligns the documentation application with the reverted Next.js version. |
| packages/emcn/package.json | Aligns the package development dependency while continuing to satisfy its broad Next peer range. |
| package.json | Keeps Next, its environment package, and explicitly listed SWC binaries on one version. |
| bun.lock | Resolves Next, environment, compiler, and associated optional platform packages consistently at 16.2.12. |
Reviews (1): Last reviewed commit: "fix(deps): revert next to 16.2.12, its 1..." | Re-trigger Greptile