Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
9136e053
Unverified
Commit
9136e053
authored
Oct 16, 2026
by
Niklas Mischkulnig
Committed by
GitHub
Oct 28, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove retry, it's not used in dev anymore
parent
acc80693
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
30 deletions
+17
-30
get-static-info-including-layouts.ts
packages/next/src/build/get-static-info-including-layouts.ts
+15
-29
setup-dev-bundler.ts
...ges/next/src/server/lib/router-utils/setup-dev-bundler.ts
+2
-1
No files found.
packages/next/src/build/get-static-info-including-layouts.ts
View file @
9136e053
...
...
@@ -17,12 +17,8 @@ import { isAppPageRoute } from '../lib/is-app-page-route'
import
{
UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY
}
from
'../shared/lib/entry-constants'
import
getAssetPathFromRoute
from
'../shared/lib/router/utils/get-asset-path-from-route'
import
{
Bundler
}
from
'../lib/bundler'
import
{
wait
}
from
'../lib/wait'
import
{
getBuildDistDir
}
from
'../export/utils'
const
DEV_STATIC_INFO_RETRY_TIMEOUT
=
5
_000
const
DEV_STATIC_INFO_RETRY_INTERVAL
=
100
export
async
function
getStaticInfoIncludingLayouts
({
dir
,
isInsideAppDir
,
...
...
@@ -123,33 +119,23 @@ export async function getStaticInfoIncludingLayouts({
}
baseline
=
sort
(
baseline
)
const
retryUntil
=
Date
.
now
()
+
DEV_STATIC_INFO_RETRY_TIMEOUT
while
(
true
)
{
let
validationError
:
Error
try
{
const
turbopack
=
readStaticInfo
()
if
(
JSON
.
stringify
(
baseline
)
===
JSON
.
stringify
(
sort
(
turbopack
)))
{
return
turbopack
}
validationError
=
new
Error
(
`Static info mismatch for
${
pageFilePath
}
: `
+
JSON
.
stringify
({
baseline
,
turbopack
},
null
,
2
)
)
}
catch
(
cause
)
{
validationError
=
new
Error
(
'Failed to read Turbopack static info from disk'
,
{
cause
}
)
}
let
turbopack
:
PageStaticInfo
try
{
turbopack
=
readStaticInfo
()
}
catch
(
cause
)
{
throw
new
Error
(
'Failed to read Turbopack static info from disk'
,
{
cause
,
})
}
if
(
!
isDev
||
Date
.
now
()
>=
retryUntil
)
{
throw
validationError
}
await
wait
(
DEV_STATIC_INFO_RETRY_INTERVAL
)
if
(
JSON
.
stringify
(
baseline
)
!==
JSON
.
stringify
(
sort
(
turbopack
)))
{
throw
new
Error
(
`Static info mismatch for
${
pageFilePath
}
: `
+
JSON
.
stringify
({
baseline
,
turbopack
},
null
,
2
)
)
}
return
turbopack
}
else
{
return
readStaticInfo
()
}
...
...
packages/next/src/server/lib/router-utils/setup-dev-bundler.ts
View file @
9136e053
...
...
@@ -647,7 +647,8 @@ async function startWatcher(
// static info may be missing or stale here.
//
// TODO switch this over to Turbopack emitted static-info.json once we have solved the
// double-watcher race condition situation.
// double-watcher race condition situation. This is an unfortunate dev vs builds
// discrepancy
const
getStaticInfoIncludingLayoutsFromSource
=
(
require
(
'../../../build/get-static-info-including-layouts'
)
as
typeof
import
(
'../../../build/get-static-info-including-layouts'
)
).
getStaticInfoIncludingLayoutsFromSource
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment