-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not add client entries for route handlers if dynamicIO
is disabled
#72924
Conversation
To enable `"use cache"` in route handlers, we started generating client reference manifests and client chunks for route handlers in #70897. This is currently not required if `dynamicIO` is not enabled, so we can skip the additional work during builds.
Failing test suitesCommit: e31051a
Expand output● app-routes-subrequests › shortcuts after 5 subrequests
Read more about building and testing Next.js in contributing.md.
Expand output● app-routes-trailing-slash › should handle trailing slash for edge runtime
● app-routes-trailing-slash › should handle trailing slash for node runtime
Read more about building and testing Next.js in contributing.md.
Expand output● app-simple-routes › works with simple routes › renders a node route
● app-simple-routes › works with simple routes › renders a edge route
Read more about building and testing Next.js in contributing.md.
Expand output● app-custom-routes › works with api prefix correctly › statically generates correctly with no dynamic usage
● app-custom-routes › works with api prefix correctly › does not statically generate with dynamic usage
● app-custom-routes › works with generateStaticParams correctly › responds correctly on /static/first/data.json
● app-custom-routes › works with generateStaticParams correctly › responds correctly on /static/second/data.json
● app-custom-routes › works with generateStaticParams correctly › responds correctly on /static/three/data.json
● app-custom-routes › works with generateStaticParams correctly › revalidates correctly on /revalidate-1/first/data.json
● app-custom-routes › works with generateStaticParams correctly › revalidates correctly on /revalidate-1/second/data.json
● app-custom-routes › works with generateStaticParams correctly › revalidates correctly on /revalidate-1/three/data.json
● app-custom-routes › basic fetch request with a response › made via a GET request › responds correctly on /basic/endpoint
● app-custom-routes › basic fetch request with a response › made via a GET request › responds correctly on /basic/vercel/endpoint
● app-custom-routes › basic fetch request with a response › made via a POST request › responds correctly on /basic/endpoint
● app-custom-routes › basic fetch request with a response › made via a POST request › responds correctly on /basic/vercel/endpoint
● app-custom-routes › basic fetch request with a response › made via a PUT request › responds correctly on /basic/endpoint
● app-custom-routes › basic fetch request with a response › made via a PUT request › responds correctly on /basic/vercel/endpoint
● app-custom-routes › basic fetch request with a response › made via a DELETE request › responds correctly on /basic/endpoint
● app-custom-routes › basic fetch request with a response › made via a DELETE request › responds correctly on /basic/vercel/endpoint
● app-custom-routes › basic fetch request with a response › made via a PATCH request › responds correctly on /basic/endpoint
● app-custom-routes › basic fetch request with a response › made via a PATCH request › responds correctly on /basic/vercel/endpoint
● app-custom-routes › basic fetch request with a response › abort via a GET request › aborts without error on /basic/endpoint
● app-custom-routes › basic fetch request with a response › abort via a GET request › aborts without error on /basic/vercel/endpoint
● app-custom-routes › basic fetch request with a response › abort via a POST request › aborts without error on /basic/endpoint
● app-custom-routes › basic fetch request with a response › abort via a POST request › aborts without error on /basic/vercel/endpoint
● app-custom-routes › basic fetch request with a response › abort via a PUT request › aborts without error on /basic/endpoint
● app-custom-routes › basic fetch request with a response › abort via a PUT request › aborts without error on /basic/vercel/endpoint
● app-custom-routes › basic fetch request with a response › abort via a DELETE request › aborts without error on /basic/endpoint
● app-custom-routes › basic fetch request with a response › abort via a DELETE request › aborts without error on /basic/vercel/endpoint
● app-custom-routes › basic fetch request with a response › abort via a PATCH request › aborts without error on /basic/endpoint
● app-custom-routes › basic fetch request with a response › abort via a PATCH request › aborts without error on /basic/vercel/endpoint
● app-custom-routes › basic fetch request with a response › route groups › routes to the correct handler
● app-custom-routes › basic fetch request with a response › request › can read query parameters
● app-custom-routes › basic fetch request with a response › request › can read query parameters (edge)
● app-custom-routes › basic fetch request with a response › response › supports the NextResponse.rewrite() helper
● app-custom-routes › basic fetch request with a response › response › supports the NextResponse.redirect() helper
● app-custom-routes › basic fetch request with a response › response › supports the NextResponse.json() helper
● app-custom-routes › body › can handle handle a streaming request and streaming response
● app-custom-routes › body › can handle handle a streaming request and streaming response (edge)
● app-custom-routes › body › can read a JSON encoded body
● app-custom-routes › body › can read a JSON encoded body (edge)
● app-custom-routes › body › can read a JSON encoded body for DELETE requests
● app-custom-routes › body › can read a JSON encoded body for OPTIONS requests
● app-custom-routes › body › can read a streamed JSON encoded body
● app-custom-routes › body › can read a streamed JSON encoded body (edge)
● app-custom-routes › body › can read the text body
● app-custom-routes › body › can read the text body (edge)
● app-custom-routes › context › provides params to routes with dynamic parameters
● app-custom-routes › context › provides params to routes with catch-all routes
● app-custom-routes › context › does not provide params to routes without dynamic parameters
● app-custom-routes › hooks › headers › gets the correct values
● app-custom-routes › hooks › cookies › gets the correct values
● app-custom-routes › hooks › req.cookies › gets the correct values
● app-custom-routes › hooks › (await cookies()).has() › gets the correct values
● app-custom-routes › hooks › redirect › can respond correctly
● app-custom-routes › hooks › permanentRedirect › can respond correctly
● app-custom-routes › hooks › notFound › can respond correctly in nodejs
● app-custom-routes › hooks › notFound › can respond correctly in edge
● app-custom-routes › error conditions › responds with 400 (Bad Request) when the requested method is not a valid HTTP method
● app-custom-routes › error conditions › responds with 405 (Method Not Allowed) when method is not implemented
● app-custom-routes › error conditions › responds with 500 (Internal Server Error) when the handler throws an error
● app-custom-routes › error conditions › responds with 500 (Internal Server Error) when the handler calls NextResponse.next()
● app-custom-routes › automatic implementations › implements HEAD on routes with GET already implemented
● app-custom-routes › automatic implementations › implements OPTIONS on routes
● app-custom-routes › edge functions › returns response using edge runtime
● app-custom-routes › edge functions › returns a response when headers are accessed
● app-custom-routes › dynamic = "force-static" › strips search, headers, and domain from request
● app-custom-routes › customized metadata routes › should work if conflict with metadata routes convention
● app-custom-routes › no response returned › should print an error when no response is returned
● app-custom-routes › no bundle error › should not print bundling warning about React
Read more about building and testing Next.js in contributing.md.
Expand output● app-custom-routes › works with api prefix correctly › statically generates correctly with no dynamic usage
● app-custom-routes › works with api prefix correctly › does not statically generate with dynamic usage
● app-custom-routes › works with generateStaticParams correctly › responds correctly on /static/first/data.json
● app-custom-routes › works with generateStaticParams correctly › responds correctly on /static/second/data.json
● app-custom-routes › works with generateStaticParams correctly › responds correctly on /static/three/data.json
● app-custom-routes › works with generateStaticParams correctly › revalidates correctly on /revalidate-1/first/data.json
● app-custom-routes › works with generateStaticParams correctly › revalidates correctly on /revalidate-1/second/data.json
● app-custom-routes › works with generateStaticParams correctly › revalidates correctly on /revalidate-1/three/data.json
● app-custom-routes › basic fetch request with a response › made via a GET request › responds correctly on /basic/endpoint
● app-custom-routes › basic fetch request with a response › made via a GET request › responds correctly on /basic/vercel/endpoint
● app-custom-routes › basic fetch request with a response › made via a POST request › responds correctly on /basic/endpoint
● app-custom-routes › basic fetch request with a response › made via a POST request › responds correctly on /basic/vercel/endpoint
● app-custom-routes › basic fetch request with a response › made via a PUT request › responds correctly on /basic/endpoint
● app-custom-routes › basic fetch request with a response › made via a PUT request › responds correctly on /basic/vercel/endpoint
● app-custom-routes › basic fetch request with a response › made via a DELETE request › responds correctly on /basic/endpoint
● app-custom-routes › basic fetch request with a response › made via a DELETE request › responds correctly on /basic/vercel/endpoint
● app-custom-routes › basic fetch request with a response › made via a PATCH request › responds correctly on /basic/endpoint
● app-custom-routes › basic fetch request with a response › made via a PATCH request › responds correctly on /basic/vercel/endpoint
● app-custom-routes › basic fetch request with a response › abort via a GET request › aborts without error on /basic/endpoint
● app-custom-routes › basic fetch request with a response › abort via a GET request › aborts without error on /basic/vercel/endpoint
● app-custom-routes › basic fetch request with a response › abort via a POST request › aborts without error on /basic/endpoint
● app-custom-routes › basic fetch request with a response › abort via a POST request › aborts without error on /basic/vercel/endpoint
● app-custom-routes › basic fetch request with a response › abort via a PUT request › aborts without error on /basic/endpoint
● app-custom-routes › basic fetch request with a response › abort via a PUT request › aborts without error on /basic/vercel/endpoint
● app-custom-routes › basic fetch request with a response › abort via a DELETE request › aborts without error on /basic/endpoint
● app-custom-routes › basic fetch request with a response › abort via a DELETE request › aborts without error on /basic/vercel/endpoint
● app-custom-routes › basic fetch request with a response › abort via a PATCH request › aborts without error on /basic/endpoint
● app-custom-routes › basic fetch request with a response › abort via a PATCH request › aborts without error on /basic/vercel/endpoint
● app-custom-routes › basic fetch request with a response › route groups › routes to the correct handler
● app-custom-routes › basic fetch request with a response › request › can read query parameters
● app-custom-routes › basic fetch request with a response › request › can read query parameters (edge)
● app-custom-routes › basic fetch request with a response › response › supports the NextResponse.rewrite() helper
● app-custom-routes › basic fetch request with a response › response › supports the NextResponse.redirect() helper
● app-custom-routes › basic fetch request with a response › response › supports the NextResponse.json() helper
● app-custom-routes › body › can handle handle a streaming request and streaming response
● app-custom-routes › body › can handle handle a streaming request and streaming response (edge)
● app-custom-routes › body › can read a JSON encoded body
● app-custom-routes › body › can read a JSON encoded body (edge)
● app-custom-routes › body › can read a JSON encoded body for DELETE requests
● app-custom-routes › body › can read a JSON encoded body for OPTIONS requests
● app-custom-routes › body › can read a streamed JSON encoded body
● app-custom-routes › body › can read a streamed JSON encoded body (edge)
● app-custom-routes › body › can read the text body
● app-custom-routes › body › can read the text body (edge)
● app-custom-routes › context › provides params to routes with dynamic parameters
● app-custom-routes › context › provides params to routes with catch-all routes
● app-custom-routes › context › does not provide params to routes without dynamic parameters
● app-custom-routes › hooks › headers › gets the correct values
● app-custom-routes › hooks › cookies › gets the correct values
● app-custom-routes › hooks › req.cookies › gets the correct values
● app-custom-routes › hooks › (await cookies()).has() › gets the correct values
● app-custom-routes › hooks › redirect › can respond correctly
● app-custom-routes › hooks › permanentRedirect › can respond correctly
● app-custom-routes › hooks › notFound › can respond correctly in nodejs
● app-custom-routes › hooks › notFound › can respond correctly in edge
● app-custom-routes › error conditions › responds with 400 (Bad Request) when the requested method is not a valid HTTP method
● app-custom-routes › error conditions › responds with 405 (Method Not Allowed) when method is not implemented
● app-custom-routes › error conditions › responds with 500 (Internal Server Error) when the handler throws an error
● app-custom-routes › error conditions › responds with 500 (Internal Server Error) when the handler calls NextResponse.next()
● app-custom-routes › automatic implementations › implements HEAD on routes with GET already implemented
● app-custom-routes › automatic implementations › implements OPTIONS on routes
● app-custom-routes › edge functions › returns response using edge runtime
● app-custom-routes › edge functions › returns a response when headers are accessed
● app-custom-routes › dynamic = "force-static" › strips search, headers, and domain from request
● app-custom-routes › customized metadata routes › should work if conflict with metadata routes convention
● app-custom-routes › no response returned › should print an error when no response is returned
● app-custom-routes › no bundle error › should not print bundling warning about React
Read more about building and testing Next.js in contributing.md.
Expand output● edge runtime node compatibility › [app] supports node:buffer
Read more about building and testing Next.js in contributing.md.
Expand output● edge-route-catchall › should correctly normalize edge route catch-all with a single param
● edge-route-catchall › should correctly normalize edge route catch-all with multiple params
Read more about building and testing Next.js in contributing.md.
Expand output● unstable_after() in nodejs runtime › triggers revalidate from a page
● unstable_after() in nodejs runtime › triggers revalidate from a server action
● unstable_after() in nodejs runtime › triggers revalidate from a route handler
● unstable_after() in nodejs runtime › triggers revalidate from middleware
● unstable_after() in edge runtime › triggers revalidate from a page
● unstable_after() in edge runtime › triggers revalidate from a server action
● unstable_after() in edge runtime › triggers revalidate from a route handler
● unstable_after() in edge runtime › triggers revalidate from middleware
Read more about building and testing Next.js in contributing.md.
Expand output● Edge runtime code with imports › Edge API statically importing node.js module › throws unsupported module error in dev at runtime and highlights the faulty line
Read more about building and testing Next.js in contributing.md. |
This change doesn't seem to be worth it at the moment. |
Note
This PR is best reviewed with hidden whitespace changes.
To enable
"use cache"
in route handlers, we started generating client reference manifests and client chunks for route handlers in #70897.This is currently not required if
experimental.dynamicIO
is not enabled, so we can skip the additional work during builds.