Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Skip client reference manifests for static metadata route handlers #74876

Merged
merged 4 commits into from
Jan 15, 2025

Conversation

unstubbable
Copy link
Contributor

@unstubbable unstubbable commented Jan 14, 2025

Fixes a regression caused by #74835.

x-ref

@ijjk
Copy link
Member

ijjk commented Jan 14, 2025

Stats from current PR

Default Build (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary vercel/next.js hl/fix-favicon-deployment Change
buildDuration 18.1s 15.3s N/A
buildDurationCached 14.3s 12s N/A
nodeModulesSize 418 MB 418 MB ⚠️ +12 kB
nextStartRea..uration (ms) 421ms 418ms N/A
Client Bundles (main, webpack)
vercel/next.js canary vercel/next.js hl/fix-favicon-deployment Change
5306-HASH.js gzip 53.9 kB 53.9 kB N/A
8276.HASH.js gzip 169 B 168 B N/A
8377-HASH.js gzip 5.44 kB 5.44 kB N/A
bccd1874-HASH.js gzip 52.9 kB 52.9 kB
framework-HASH.js gzip 57.5 kB 57.5 kB N/A
main-app-HASH.js gzip 240 B 242 B N/A
main-HASH.js gzip 34.2 kB 34.2 kB N/A
webpack-HASH.js gzip 1.71 kB 1.71 kB N/A
Overall change 52.9 kB 52.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary vercel/next.js hl/fix-favicon-deployment Change
polyfills-HASH.js gzip 39.4 kB 39.4 kB
Overall change 39.4 kB 39.4 kB
Client Pages
vercel/next.js canary vercel/next.js hl/fix-favicon-deployment Change
_app-HASH.js gzip 193 B 193 B
_error-HASH.js gzip 193 B 193 B
amp-HASH.js gzip 512 B 510 B N/A
css-HASH.js gzip 343 B 342 B N/A
dynamic-HASH.js gzip 1.84 kB 1.84 kB
edge-ssr-HASH.js gzip 265 B 265 B
head-HASH.js gzip 363 B 362 B N/A
hooks-HASH.js gzip 393 B 392 B N/A
image-HASH.js gzip 4.57 kB 4.57 kB N/A
index-HASH.js gzip 268 B 268 B
link-HASH.js gzip 2.35 kB 2.34 kB N/A
routerDirect..HASH.js gzip 328 B 328 B
script-HASH.js gzip 397 B 397 B
withRouter-HASH.js gzip 323 B 326 B N/A
1afbb74e6ecf..834.css gzip 106 B 106 B
Overall change 3.59 kB 3.59 kB
Client Build Manifests
vercel/next.js canary vercel/next.js hl/fix-favicon-deployment Change
_buildManifest.js gzip 749 B 747 B N/A
Overall change 0 B 0 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js hl/fix-favicon-deployment Change
index.html gzip 524 B 524 B
link.html gzip 539 B 538 B N/A
withRouter.html gzip 520 B 520 B
Overall change 1.04 kB 1.04 kB
Edge SSR bundle Size
vercel/next.js canary vercel/next.js hl/fix-favicon-deployment Change
edge-ssr.js gzip 129 kB 129 kB N/A
page.js gzip 208 kB 208 kB N/A
Overall change 0 B 0 B
Middleware size
vercel/next.js canary vercel/next.js hl/fix-favicon-deployment Change
middleware-b..fest.js gzip 670 B 666 B N/A
middleware-r..fest.js gzip 155 B 156 B N/A
middleware.js gzip 31.3 kB 31.3 kB N/A
edge-runtime..pack.js gzip 844 B 844 B
Overall change 844 B 844 B
Next Runtimes
vercel/next.js canary vercel/next.js hl/fix-favicon-deployment Change
274-experime...dev.js gzip 322 B 322 B
274.runtime.dev.js gzip 314 B 314 B
app-page-exp...dev.js gzip 374 kB 374 kB
app-page-exp..prod.js gzip 130 kB 130 kB
app-page-tur..prod.js gzip 143 kB 143 kB
app-page-tur..prod.js gzip 139 kB 139 kB
app-page.run...dev.js gzip 361 kB 361 kB
app-page.run..prod.js gzip 126 kB 126 kB
app-route-ex...dev.js gzip 37.6 kB 37.6 kB
app-route-ex..prod.js gzip 25.6 kB 25.6 kB
app-route-tu..prod.js gzip 25.6 kB 25.6 kB
app-route-tu..prod.js gzip 25.4 kB 25.4 kB
app-route.ru...dev.js gzip 39.2 kB 39.2 kB
app-route.ru..prod.js gzip 25.4 kB 25.4 kB
pages-api-tu..prod.js gzip 9.69 kB 9.69 kB
pages-api.ru...dev.js gzip 11.6 kB 11.6 kB
pages-api.ru..prod.js gzip 9.68 kB 9.68 kB
pages-turbo...prod.js gzip 21.7 kB 21.7 kB
pages.runtim...dev.js gzip 27.5 kB 27.5 kB
pages.runtim..prod.js gzip 21.7 kB 21.7 kB
server.runti..prod.js gzip 916 kB 916 kB
Overall change 2.47 MB 2.47 MB
build cache Overall increase ⚠️
vercel/next.js canary vercel/next.js hl/fix-favicon-deployment Change
0.pack gzip 2.09 MB 2.1 MB ⚠️ +5.2 kB
index.pack gzip 74.7 kB 75.1 kB ⚠️ +421 B
Overall change 2.17 MB 2.17 MB ⚠️ +5.62 kB
Diff details
Diff for main-HASH.js

Diff too large to display

Commit: 97049e2

@ijjk
Copy link
Member

ijjk commented Jan 14, 2025

Failing test suites

Commit: b16fb89

pnpm test test/integration/amp-export-validation/test/index.test.js (turbopack)

  • AMP Validation on Export > production mode > should have shown errors during build
Expand output

● AMP Validation on Export › production mode › should have shown errors during build

expect(received).toMatch(expected)

Expected pattern: /error.*The mandatory attribute 'height' is missing in tag 'amp-video'\./
Received string:  "   Loading config from /root/actions-runner/_work/next.js/next.js/test/integration/amp-export-validation/next.config.js
   Loading config from /root/actions-runner/_work/next.js/next.js/test/integration/amp-export-validation/next.config.js
   ▲ Next.js 15.2.0-canary.10 (Turbopack)·
   Checking validity of types ...
   Creating an optimized production build ...
   Loading config from /root/actions-runner/_work/next.js/next.js/test/integration/amp-export-validation/next.config.js
   Building (0/7) ...
   Building (1/7)··
   Building (3/7)··
   Building (5/7)··
 ✓ Building (7/7)
 ✓ Compiled successfully in 3.7s
   Collecting page data ...
   Generating static pages (0/8) ...
   Generating static pages (2/8)··
   Generating static pages (4/8)··
 ⚠ Linting is disabled.
Error occurred prerendering page \"/dog-cat\". Read more: https://nextjs.org/docs/messages/prerender-error
AssertionError: Assertion failed: WebAssembly is uninitialized

  at new module$contents$goog$asserts_AssertionError (../evalmachine.<anonymous>:106:1695)
  at module$contents$goog$asserts_doAssertFailure (../evalmachine.<anonymous>:107:354)
  at goog.asserts.assertExists (../evalmachine.<anonymous>:109:142)
  at Object.module$contents$amp$validator_validateString [as validateString] (../evalmachine.<anonymous>:2663:108)
  at Validator.validateString (../packages/next/dist/compiled/amphtml-validator/index.js:1:20650)
  at validateAmp (../packages/next/dist/export/routes/pages.js:106:34)
  at async exportPagesPage (../packages/next/dist/export/routes/pages.js:123:13)
  at async Span.traceAsyncFn (../packages/next/dist/trace/trace.js:156:20)
  at async exportPage (../packages/next/dist/export/worker.js:349:18)
  Export encountered an error on /dog-cat, exiting the build.
   ⨯ Static worker exited with code: 1 and signal: null
  "
  at Object.toMatch (integration/amp-export-validation/test/index.test.js:28:29)

Read more about building and testing Next.js in contributing.md.

pnpm test-start test/e2e/app-dir/use-cache-metadata-route-handler/use-cache-metadata-route-handler.test.ts

  • use-cache-metadata-route-handler > should include the client reference manifest in the route.js.nft.json files of dynamic metadata routes
Expand output

● use-cache-metadata-route-handler › should include the client reference manifest in the route.js.nft.json files of dynamic metadata routes

expect(received).toInclude(expected)

Expected string to include:
  "route_client-reference-manifest.js"
Received:
  ["../../../../node_modules/.pnpm/file+..+next-repo-997b8de5d9d191898a8dbfc6f0f06bdba96ee46139b8f3500dd87134363e399d+packages+n_6s4i7mkeodwlclhx3mjcjfvc5m/node_modules/next/dist/compiled/@opentelemetry/api/index.js", "../../../../node_modules/.pnpm/file+..+next-repo-997b8de5d9d191898a8dbfc6f0f06bdba96ee46139b8f3500dd87134363e399d+packages+n_6s4i7mkeodwlclhx3mjcjfvc5m/node_modules/next/dist/compiled/@opentelemetry/api/package.json", "../../../../node_modules/.pnpm/file+..+next-repo-997b8de5d9d191898a8dbfc6f0f06bdba96ee46139b8f3500dd87134363e399d+packages+n_6s4i7mkeodwlclhx3mjcjfvc5m/node_modules/next/dist/compiled/@vercel/og/LICENSE", "../../../../node_modules/.pnpm/file+..+next-repo-997b8de5d9d191898a8dbfc6f0f06bdba96ee46139b8f3500dd87134363e399d+packages+n_6s4i7mkeodwlclhx3mjcjfvc5m/node_modules/next/dist/compiled/@vercel/og/index.edge.js", "../../../../node_modules/.pnpm/file+..+next-repo-997b8de5d9d191898a8dbfc6f0f06bdba96ee46139b8f3500dd87134363e399d+packages+n_6s4i7mkeodwlclhx3mjcjfvc5m/node_modules/next/dist/compiled/@vercel/og/index.node.js", "../../../../node_modules/.pnpm/file+..+next-repo-997b8de5d9d191898a8dbfc6f0f06bdba96ee46139b8f3500dd87134363e399d+packages+n_6s4i7mkeodwlclhx3mjcjfvc5m/node_modules/next/dist/compiled/@vercel/og/noto-sans-v27-latin-regular.ttf", "../../../../node_modules/.pnpm/file+..+next-repo-997b8de5d9d191898a8dbfc6f0f06bdba96ee46139b8f3500dd87134363e399d+packages+n_6s4i7mkeodwlclhx3mjcjfvc5m/node_modules/next/dist/compiled/@vercel/og/package.json", "../../../../node_modules/.pnpm/file+..+next-repo-997b8de5d9d191898a8dbfc6f0f06bdba96ee46139b8f3500dd87134363e399d+packages+n_6s4i7mkeodwlclhx3mjcjfvc5m/node_modules/next/dist/compiled/@vercel/og/resvg.wasm", "../../../../node_modules/.pnpm/file+..+next-repo-997b8de5d9d191898a8dbfc6f0f06bdba96ee46139b8f3500dd87134363e399d+packages+n_6s4i7mkeodwlclhx3mjcjfvc5m/node_modules/next/dist/compiled/@vercel/og/satori/LICENSE", "../../../../node_modules/.pnpm/file+..+next-repo-997b8de5d9d191898a8dbfc6f0f06bdba96ee46139b8f3500dd87134363e399d+packages+n_6s4i7mkeodwlclhx3mjcjfvc5m/node_modules/next/dist/compiled/@vercel/og/yoga.wasm", …]

  147 |         )
  148 |
> 149 |         expect(files).toInclude('route_client-reference-manifest.js')
      |                       ^
  150 |       }
  151 |     })
  152 |

  at Object.toInclude (e2e/app-dir/use-cache-metadata-route-handler/use-cache-metadata-route-handler.test.ts:149:23)

Read more about building and testing Next.js in contributing.md.

@unstubbable unstubbable marked this pull request as ready for review January 14, 2025 23:55
@unstubbable unstubbable enabled auto-merge (squash) January 15, 2025 00:38
@unstubbable unstubbable merged commit 441a235 into canary Jan 15, 2025
130 checks passed
@unstubbable unstubbable deleted the hl/fix-favicon-deployment branch January 15, 2025 00:43
unstubbable added a commit that referenced this pull request Jan 15, 2025
Follow-up fix for #74876. Not all app dir entries have an
`absolutePagePath` in their module build info, e.g. the global not found
page does not have one. But we still need to include the client
reference manifest in the trace for those entries.

[x-ref](https://vercel.com/vtest314-next-e2e-tests/vtest314-e2e-tests/EngjzrvvzQ4GQra6tnGCy98PR6yd/logs?startDate=1736936280&endDate=1736938140&selectedLogId=fl27k-1736937944551-421fa6816369)
unstubbable added a commit that referenced this pull request Jan 15, 2025
…74919)

Follow-up fix for #74876. Not all app dir entries have an
`absolutePagePath` in their module build info, e.g. the global not found
page does not have one. But we still need to include the client
reference manifest in the trace for those entries.


[x-ref](https://vercel.com/vtest314-next-e2e-tests/vtest314-e2e-tests/EngjzrvvzQ4GQra6tnGCy98PR6yd/logs?startDate=1736936280&endDate=1736938140&selectedLogId=fl27k-1736937944551-421fa6816369)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 29, 2025
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants