Skip to content

Fix addMissingDependency - #98588

Open
jimmyhmiller wants to merge 1 commit into
canaryfrom
jimmym/turbopack-webpack-loader-missing-dependency
Open

Fix addMissingDependency#98588
jimmyhmiller wants to merge 1 commit into
canaryfrom
jimmym/turbopack-webpack-loader-missing-dependency

Conversation

@jimmyhmiller

Copy link
Copy Markdown
Contributor

While before this change we had addMissingDependency, we didn't properly respond when the file for that missing dep was added.

The way webpack does this internally is not the exact same shape as the IPC here, it has them as a separate field. I could not find any reason not to just add them to the filePaths here. So that's what I did to keep things simple.

While before this change we had addMissingDependency, we didn't properly respond when the file for that missing dep was added.

The way webpack does this internally is not the exact same shape as the IPC here, it has them as a separate field. I could not find any reason not to just add them to the filePaths here. So that's what I did to keep things simple.
@jimmyhmiller
jimmyhmiller requested a review from a team September 11, 2026 20:18
@github-actions

github-actions Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Failing test suites

Commit: 14b4a6d | About building and testing Next.js

pnpm test-dev test/development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts (job)

  • instant-nav-panel > SPA captures > should keep params and searchParams RSC content suspended for a captured SPA navigation (DD)
Expand output

● instant-nav-panel › SPA captures › should keep params and searchParams RSC content suspended for a captured SPA navigation

locator.waitFor: Timeout 60000ms exceeded.
Call log:
  - waiting for locator('[data-testid="dynamic-skeleton"]') to be visible

  278 |     await browser
  279 |       .locator('[data-testid="dynamic-skeleton"]')
> 280 |       .waitFor({ state: 'visible' })
      |        ^
  281 |     await browser
  282 |       .locator('[data-testid="param-skeleton"]')
  283 |       .waitFor({ state: 'visible' })

  at waitFor (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:280:8)
  at Object.expectTargetPageSpaShell (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:694:13)

'export const value = "created"'
)

await waitFor(1000)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the sleep required... doesn't rendering block?

@mischnic mischnic Sep 11, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do this instead:

await next.patchFile(
     'utils/missing-dependency.ts',
      'export const value = "created"',
     async () => {
       await retry(async () =>{
         const $2 = await next.render$('/')
         expect($2('p').text()).toContain('missing dependency: true')
     })
})

Comment on lines +554 to +556
const { missingDependencies } = result as typeof result & {
missingDependencies: string[]
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't we jsut change the type declaration for RunLoaderResult?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants