next.js
83994338 - Preserve the calling function in build-time generator diagnostics

Commit
55 days ago
Preserve the calling function in build-time generator diagnostics Carry the public export name on BuildTimeGeneratorStore so request API, cache, and rendering-invariant errors identify the generator that was actually running. generateStaticParams initializes the field explicitly; its existing error messages and execution behavior remain unchanged. For example, a future generator that calls headers() now receives an error about that generator, not generateStaticParams. Revalidation preserves the same context before the generic render-phase rejection. Missing-root-param guidance about a parent generateStaticParams is only used for that API, rather than suggesting other generators receive parent parameter values. Verification: the existing generate-static-params-errors and root-param generator fixtures pass all 10 production Webpack tests. The Next.js build, repository type check, and changed-file lint checks pass.
Author
Parents
Loading