Commit 4388d62a authored by Tobias Koppers's avatar Tobias Koppers

Fix await on worker.shutdown() and update cache-components-errors snapshots

- Add missing await on worker.shutdown() in turbopack-build/index.ts
  (shutdown() returns a Promise; the .then() was not async)
- Update 10 inline snapshots in cache-components-errors that were missing
  the blank line + "> " prefix produced by printAndExit() in next-build.ts
  for NEXT_EXPORT_ERROR (non-debug-prerender, turbopack and webpack branches)
Co-Authored-By: 's avatarClaude <noreply@anthropic.com>
parent ae397210
......@@ -46,12 +46,14 @@ async function turbopackBuildWithWorker(): ReturnType<
return {
// destroy worker when Turbopack has shutdown so it's not sticking around using memory
// We need to wait for shutdown to make sure filesystem cache is flushed
shutdownPromise: worker.waitForShutdown().then(({ debugTraceEvents }) => {
if (debugTraceEvents) {
recordTraceEvents(debugTraceEvents)
}
worker.shutdown()
}),
shutdownPromise: worker
.waitForShutdown()
.then(async ({ debugTraceEvents }) => {
if (debugTraceEvents) {
recordTraceEvents(debugTraceEvents)
}
await worker.shutdown()
}),
buildTraceContext,
duration,
}
......
......@@ -2719,7 +2719,8 @@ describe('Cache Components Errors', () => {
- Start the app in development mode by running \`next dev\`, then open "/use-cache-connection" in your browser to investigate the error.
- Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.
Error occurred prerendering page "/use-cache-connection". Read more: https://nextjs.org/docs/messages/prerender-error
Export encountered an error on /use-cache-connection/page: /use-cache-connection, exiting the build."
> Export encountered an error on /use-cache-connection/page: /use-cache-connection, exiting the build."
`)
}
} else {
......@@ -2750,7 +2751,8 @@ describe('Cache Components Errors', () => {
- Start the app in development mode by running \`next dev\`, then open "/use-cache-connection" in your browser to investigate the error.
- Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.
Error occurred prerendering page "/use-cache-connection". Read more: https://nextjs.org/docs/messages/prerender-error
Export encountered an error on /use-cache-connection/page: /use-cache-connection, exiting the build."
> Export encountered an error on /use-cache-connection/page: /use-cache-connection, exiting the build."
`)
}
}
......@@ -3978,7 +3980,8 @@ Learn more: https://nextjs.org/docs/messages/blocking-route`
- Start the app in development mode by running \`next dev\`, then open "/use-cache-cookies-third-party" in your browser to investigate the error.
- Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.
Error occurred prerendering page "/use-cache-cookies-third-party". Read more: https://nextjs.org/docs/messages/prerender-error
Export encountered an error on /use-cache-cookies-third-party/page: /use-cache-cookies-third-party, exiting the build."
> Export encountered an error on /use-cache-cookies-third-party/page: /use-cache-cookies-third-party, exiting the build."
`)
}
} else {
......@@ -4008,7 +4011,8 @@ Learn more: https://nextjs.org/docs/messages/blocking-route`
- Start the app in development mode by running \`next dev\`, then open "/use-cache-cookies-third-party" in your browser to investigate the error.
- Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.
Error occurred prerendering page "/use-cache-cookies-third-party". Read more: https://nextjs.org/docs/messages/prerender-error
Export encountered an error on /use-cache-cookies-third-party/page: /use-cache-cookies-third-party, exiting the build."
> Export encountered an error on /use-cache-cookies-third-party/page: /use-cache-cookies-third-party, exiting the build."
`)
}
}
......@@ -4096,7 +4100,8 @@ Learn more: https://nextjs.org/docs/messages/blocking-route`
- Start the app in development mode by running \`next dev\`, then open "/use-cache-draft-mode-third-party" in your browser to investigate the error.
- Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.
Error occurred prerendering page "/use-cache-draft-mode-third-party". Read more: https://nextjs.org/docs/messages/prerender-error
Export encountered an error on /use-cache-draft-mode-third-party/page: /use-cache-draft-mode-third-party, exiting the build."
> Export encountered an error on /use-cache-draft-mode-third-party/page: /use-cache-draft-mode-third-party, exiting the build."
`)
} else {
expect(output).toMatchInlineSnapshot(`
......@@ -4106,7 +4111,8 @@ Learn more: https://nextjs.org/docs/messages/blocking-route`
- Start the app in development mode by running \`next dev\`, then open "/use-cache-draft-mode-third-party" in your browser to investigate the error.
- Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.
Error occurred prerendering page "/use-cache-draft-mode-third-party". Read more: https://nextjs.org/docs/messages/prerender-error
Export encountered an error on /use-cache-draft-mode-third-party/page: /use-cache-draft-mode-third-party, exiting the build."
> Export encountered an error on /use-cache-draft-mode-third-party/page: /use-cache-draft-mode-third-party, exiting the build."
`)
}
}
......@@ -4175,7 +4181,8 @@ Learn more: https://nextjs.org/docs/messages/blocking-route`
- Start the app in development mode by running \`next dev\`, then open "/use-cache-headers-third-party" in your browser to investigate the error.
- Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.
Error occurred prerendering page "/use-cache-headers-third-party". Read more: https://nextjs.org/docs/messages/prerender-error
Export encountered an error on /use-cache-headers-third-party/page: /use-cache-headers-third-party, exiting the build."
> Export encountered an error on /use-cache-headers-third-party/page: /use-cache-headers-third-party, exiting the build."
`)
}
} else {
......@@ -4205,7 +4212,8 @@ Learn more: https://nextjs.org/docs/messages/blocking-route`
- Start the app in development mode by running \`next dev\`, then open "/use-cache-headers-third-party" in your browser to investigate the error.
- Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.
Error occurred prerendering page "/use-cache-headers-third-party". Read more: https://nextjs.org/docs/messages/prerender-error
Export encountered an error on /use-cache-headers-third-party/page: /use-cache-headers-third-party, exiting the build."
> Export encountered an error on /use-cache-headers-third-party/page: /use-cache-headers-third-party, exiting the build."
`)
}
}
......@@ -4274,7 +4282,8 @@ Learn more: https://nextjs.org/docs/messages/blocking-route`
- Start the app in development mode by running \`next dev\`, then open "/use-cache-connection-third-party" in your browser to investigate the error.
- Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.
Error occurred prerendering page "/use-cache-connection-third-party". Read more: https://nextjs.org/docs/messages/prerender-error
Export encountered an error on /use-cache-connection-third-party/page: /use-cache-connection-third-party, exiting the build."
> Export encountered an error on /use-cache-connection-third-party/page: /use-cache-connection-third-party, exiting the build."
`)
}
} else {
......@@ -4304,7 +4313,8 @@ Learn more: https://nextjs.org/docs/messages/blocking-route`
- Start the app in development mode by running \`next dev\`, then open "/use-cache-connection-third-party" in your browser to investigate the error.
- Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.
Error occurred prerendering page "/use-cache-connection-third-party". Read more: https://nextjs.org/docs/messages/prerender-error
Export encountered an error on /use-cache-connection-third-party/page: /use-cache-connection-third-party, exiting the build."
> Export encountered an error on /use-cache-connection-third-party/page: /use-cache-connection-third-party, exiting the build."
`)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment