Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[dynamicIO] flush out top-level-await in segments before prospective render #78667

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

Draft
wants to merge 8 commits into
base: canary
Choose a base branch
from

Conversation

lubieowoce
Copy link
Member

No description provided.

Copy link
Member Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@lubieowoce lubieowoce changed the title move shared types out of next-app-loader/index [dynamicIO] flush out top-level-await in segments before prospective render Apr 29, 2025
@lubieowoce lubieowoce added the CI Bypass Graphite Optimization Ignore Graphite CI optimizations, run the full CI suite. https://graphite.dev/docs/stacking-and-ci label Apr 29, 2025
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-import-cache-tracking branch from 5b283a6 to f3365c1 Compare April 29, 2025 13:46
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-io-top-level-await branch from 55b4b9f to b32c5a8 Compare April 29, 2025 13:46
@ijjk
Copy link
Member

ijjk commented Apr 29, 2025

Failing test suites

Commit: 2ce2218

pnpm test-start test/e2e/app-dir/dynamic-io-dynamic-imports/dynamic-io-dynamic-imports.test.ts

  • async imports in dynamicIO > does not cause any routes to become (partially) dynamic
Expand output

● async imports in dynamicIO › does not cause any routes to become (partially) dynamic

expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `async imports in dynamicIO does not cause any routes to become (partially) dynamic 1`

- Snapshot  - 0
+ Received  + 1

@@ -10,8 +10,9 @@
    "/inside-render/server/sync-module",
    "/outside-of-render/client/async-module",
    "/outside-of-render/client/sync-module",
    "/outside-of-render/server/async-module",
    "/outside-of-render/server/sync-module",
+   "/top-level-await-in-segment",
    "/top-level-await-in-segment/client",
    "/top-level-await-in-segment/server",
  ]

  40 |       }
  41 |
> 42 |       expect(prerenderedRoutes).toMatchInlineSnapshot(`
     |                                 ^
  43 |        [
  44 |          "/inside-render/client/async-module",
  45 |          "/inside-render/client/sync-module",

  at Object.toMatchInlineSnapshot (e2e/app-dir/dynamic-io-dynamic-imports/dynamic-io-dynamic-imports.test.ts:42:33)

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

__NEXT_EXPERIMENTAL_PPR=true pnpm test-dev test/e2e/app-dir/actions/app-action.test.ts (PPR)

  • app-dir action handling > should forward action request to a worker that contains the action handler (node)
Expand output

● app-dir action handling › should forward action request to a worker that contains the action handler (node)

page.waitForSelector: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('#other-page')

  454 |   waitForElementByCss(selector: string, timeout = 10_000) {
  455 |     return this.startChain(async () => {
> 456 |       const el = await page.waitForSelector(selector, {
      |                             ^
  457 |         timeout,
  458 |         state: 'attached',
  459 |       })

  at waitForSelector (lib/browsers/playwright.ts:456:29)
  at e2e/app-dir/actions/app-action.test.ts:897:7
  at Proxy._chain (lib/browsers/playwright.ts:568:23)
  at Proxy._chain (lib/browsers/playwright.ts:549:17)
  at Proxy.startChain (lib/browsers/playwright.ts:455:17)
  at waitForElementByCss (e2e/app-dir/actions/app-action.test.ts:900:10)

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

__NEXT_EXPERIMENTAL_PPR=true pnpm test-dev test/e2e/persistent-caching/persistent-caching.test.ts (PPR)

  • persistent-caching > should persistent cache loaders
Expand output

● persistent-caching › should persistent cache loaders

expect(received).toBe(expected) // Object.is equality

Expected: "Timestamp = 1746566126628"
Received: "Timestamp = 1746566146724"

  69 |       const browser = await next.browser('/pages')
  70 |       // TODO Persistent Caching for webpack dev server is broken
> 71 |       expect(await browser.elementByCss('main').text()).toBe(pagesTimestamp)
     |                                                         ^
  72 |       await browser.close()
  73 |     }
  74 |   })

  at Object.toBe (e2e/persistent-caching/persistent-caching.test.ts:71:57)

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

@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-import-cache-tracking branch from f3365c1 to 2ab6660 Compare April 29, 2025 15:46
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-io-top-level-await branch 2 times, most recently from 451fe97 to ff35d80 Compare April 29, 2025 16:26
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-import-cache-tracking branch from 2ab6660 to d410aa7 Compare April 29, 2025 16:26
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-io-top-level-await branch 3 times, most recently from db920c6 to c15290a Compare April 29, 2025 18:55
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-import-cache-tracking branch from 8c3b270 to 4476bbe Compare April 29, 2025 18:55
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-io-top-level-await branch from c15290a to 18d0a3b Compare April 29, 2025 19:01
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-import-cache-tracking branch from 4476bbe to cd04058 Compare April 29, 2025 19:01
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-io-top-level-await branch from 18d0a3b to 46fa3fb Compare April 30, 2025 00:39
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-import-cache-tracking branch 2 times, most recently from 1c164e1 to a832b48 Compare May 5, 2025 09:53
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-io-top-level-await branch 2 times, most recently from ff0c5d7 to ef0072a Compare May 5, 2025 12:52
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-import-cache-tracking branch from a832b48 to e4999aa Compare May 5, 2025 12:52
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-io-top-level-await branch from ef0072a to ec16646 Compare May 5, 2025 13:45
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-import-cache-tracking branch from e4999aa to 5c42cf0 Compare May 5, 2025 13:45
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-import-cache-tracking branch from 5c42cf0 to b157497 Compare May 5, 2025 15:07
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-io-top-level-await branch from ec16646 to 6dd690d Compare May 5, 2025 15:07
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-import-cache-tracking branch from b157497 to e893441 Compare May 5, 2025 15:56
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-io-top-level-await branch 3 times, most recently from e68c8a1 to 5d52fd9 Compare May 5, 2025 16:34
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-import-cache-tracking branch from 9b85bc1 to 843fdc4 Compare May 5, 2025 16:34
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-io-top-level-await branch 2 times, most recently from 966be9b to eddb1bf Compare May 5, 2025 17:29
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-import-cache-tracking branch 2 times, most recently from 6d90e17 to 2baad49 Compare May 5, 2025 18:19
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-io-top-level-await branch 2 times, most recently from 003741a to 5e91081 Compare May 6, 2025 09:50
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-import-cache-tracking branch 2 times, most recently from 3ea9d57 to 706d07a Compare May 6, 2025 10:21
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-io-top-level-await branch from 5e91081 to 05d47e9 Compare May 6, 2025 10:21
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-io-top-level-await branch from 05d47e9 to 2ce2218 Compare May 6, 2025 20:32
@lubieowoce lubieowoce force-pushed the lubieowoce/dynamic-import-cache-tracking branch from 706d07a to c33fa44 Compare May 6, 2025 20:32
Base automatically changed from lubieowoce/dynamic-import-cache-tracking to canary May 6, 2025 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Bypass Graphite Optimization Ignore Graphite CI optimizations, run the full CI suite. https://graphite.dev/docs/stacking-and-ci created-by: Next.js team PRs by the Next.js team. tests type: next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants