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
41041458
Unverified
Commit
41041458
authored
Jun 26, 2026
by
Will Binns-Smith
Committed by
GitHub
Jun 26, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "[turbopack] Use `final_read_hint` in top level turbo tasks (#94712)" (#95178)
parent
64a39af5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
26 deletions
+14
-26
project.rs
crates/next-napi-bindings/src/next_api/project.rs
+12
-18
utils.rs
crates/next-napi-bindings/src/next_api/utils.rs
+1
-1
effect.rs
turbopack/crates/turbo-tasks/src/effect.rs
+1
-7
No files found.
crates/next-napi-bindings/src/next_api/project.rs
View file @
41041458
...
@@ -1362,7 +1362,6 @@ pub async fn project_write_all_entrypoints_to_disk(
...
@@ -1362,7 +1362,6 @@ pub async fn project_write_all_entrypoints_to_disk(
let
DeferredEntrypointInfo
(
entrypoints
,
deferred_entries
)
=
let
DeferredEntrypointInfo
(
entrypoints
,
deferred_entries
)
=
&*
deferred_entrypoint_info_operation
(
container
)
&*
deferred_entrypoint_info_operation
(
container
)
.read_strongly_consistent
()
.read_strongly_consistent
()
.final_read_hint
()
.await
?
;
.await
?
;
Ok
(
compute_deferred_phase_build_paths
(
Ok
(
compute_deferred_phase_build_paths
(
...
@@ -1708,7 +1707,6 @@ pub async fn project_entrypoints(
...
@@ -1708,7 +1707,6 @@ pub async fn project_entrypoints(
effects
:
_
,
effects
:
_
,
}
=
&*
entrypoints_with_issues_op
}
=
&*
entrypoints_with_issues_op
.read_strongly_consistent
()
.read_strongly_consistent
()
.final_read_hint
()
.await
?
;
.await
?
;
Ok
((
entrypoints
.clone
(),
issues
.clone
()))
Ok
((
entrypoints
.clone
(),
issues
.clone
()))
...
@@ -1815,10 +1813,7 @@ async fn hmr_update_with_issues_operation(
...
@@ -1815,10 +1813,7 @@ async fn hmr_update_with_issues_operation(
// consumers in `hot-reloader-turbopack.ts` (`subscribeToServerHmr` and
// consumers in `hot-reloader-turbopack.ts` (`subscribeToServerHmr` and
// `subscribeToClientHmrEvents`) rely on this read *throwing* on build-graph
// `subscribeToClientHmrEvents`) rely on this read *throwing* on build-graph
// failures to trigger their recovery paths
// failures to trigger their recovery paths
let
update
=
update_op
let
update
=
update_op
.read_strongly_consistent
()
.await
?
;
.read_strongly_consistent
()
.final_read_hint
()
.await
?
;
let
filter
=
project
.issue_filter
()
.await
?
;
let
filter
=
project
.issue_filter
()
.await
?
;
let
issues
=
get_issues
(
update_op
,
&
filter
)
.await
?
;
let
issues
=
get_issues
(
update_op
,
&
filter
)
.await
?
;
let
effects
=
Arc
::
new
(
take_effects
(
update_op
)
.await
?
);
let
effects
=
Arc
::
new
(
take_effects
(
update_op
)
.await
?
);
...
@@ -2487,6 +2482,16 @@ async fn get_all_compilation_issues_inner_operation(
...
@@ -2487,6 +2482,16 @@ async fn get_all_compilation_issues_inner_operation(
Ok
(
Vc
::
cell
(()))
Ok
(
Vc
::
cell
(()))
}
}
#[turbo_tasks
::
function(operation,
root)]
async
fn
get_all_compilation_issues_operation
(
container
:
ResolvedVc
<
ProjectContainer
>
,
)
->
Result
<
Vc
<
OperationResult
>>
{
let
inner_op
=
get_all_compilation_issues_inner_operation
(
container
);
let
filter
=
container
.project
()
.issue_filter
()
.await
?
;
let
(
_
,
issues
,
effects
)
=
strongly_consistent_catch_collectables
(
inner_op
,
&
filter
)
.await
?
;
Ok
(
OperationResult
{
issues
,
effects
}
.cell
())
}
/// Returns the build-feature-usage telemetry summary for this project — the set of
/// Returns the build-feature-usage telemetry summary for this project — the set of
/// `(featureName, invocationCount)` pairs reported to the Next.js telemetry service.
/// `(featureName, invocationCount)` pairs reported to the Next.js telemetry service.
///
///
...
@@ -2528,24 +2533,13 @@ pub async fn project_feature_usage(
...
@@ -2528,24 +2533,13 @@ pub async fn project_feature_usage(
pub
async
fn
project_get_all_compilation_issues
(
pub
async
fn
project_get_all_compilation_issues
(
#[napi(ts_arg_type
=
"{ __napiType:
\
"
Project
\
" }"
)]
project
:
External
<
ProjectInstance
>
,
#[napi(ts_arg_type
=
"{ __napiType:
\
"
Project
\
" }"
)]
project
:
External
<
ProjectInstance
>
,
)
->
napi
::
Result
<
TurbopackResult
<
()
>>
{
)
->
napi
::
Result
<
TurbopackResult
<
()
>>
{
#[turbo_tasks
::
function(operation,
root)]
async
fn
get_all_compilation_issues_operation
(
container
:
ResolvedVc
<
ProjectContainer
>
,
)
->
Result
<
Vc
<
OperationResult
>>
{
let
inner_op
=
get_all_compilation_issues_inner_operation
(
container
);
let
filter
=
container
.project
()
.issue_filter
()
.await
?
;
let
(
_
,
issues
,
effects
)
=
strongly_consistent_catch_collectables
(
inner_op
,
&
filter
)
.await
?
;
Ok
(
OperationResult
{
issues
,
effects
}
.cell
())
}
let
container
=
project
.container
;
let
container
=
project
.container
;
let
issues
=
project
let
issues
=
project
.turbopack_ctx
.turbopack_ctx
.turbo_tasks
()
.turbo_tasks
()
.run_once
(
async
move
{
.run_once
(
async
move
{
let
op
=
get_all_compilation_issues_operation
(
container
);
let
op
=
get_all_compilation_issues_operation
(
container
);
let
OperationResult
{
issues
,
effects
:
_
}
=
let
OperationResult
{
issues
,
effects
:
_
}
=
&*
op
.read_strongly_consistent
()
.await
?
;
&*
op
.read_strongly_consistent
()
.final_read_hint
()
.await
?
;
Ok
(
issues
.clone
())
Ok
(
issues
.clone
())
})
})
.await
.await
...
...
crates/next-napi-bindings/src/next_api/utils.rs
View file @
41041458
...
@@ -472,7 +472,7 @@ pub async fn strongly_consistent_catch_collectables<R: VcValueType + Send>(
...
@@ -472,7 +472,7 @@ pub async fn strongly_consistent_catch_collectables<R: VcValueType + Send>(
Arc
<
Vec
<
ReadRef
<
PlainIssue
>>>
,
Arc
<
Vec
<
ReadRef
<
PlainIssue
>>>
,
Arc
<
Effects
>
,
Arc
<
Effects
>
,
)
>
{
)
>
{
let
result
=
source_op
.read_strongly_consistent
()
.
final_read_hint
()
.
await
;
let
result
=
source_op
.read_strongly_consistent
()
.await
;
let
issues
=
get_issues
(
source_op
,
filter
)
.await
?
;
let
issues
=
get_issues
(
source_op
,
filter
)
.await
?
;
let
effects
=
Arc
::
new
(
take_effects
(
source_op
)
.await
?
);
let
effects
=
Arc
::
new
(
take_effects
(
source_op
)
.await
?
);
...
...
turbopack/crates/turbo-tasks/src/effect.rs
View file @
41041458
...
@@ -566,13 +566,7 @@ where
...
@@ -566,13 +566,7 @@ where
{
{
let
mut
attempts
=
0u
size
;
let
mut
attempts
=
0u
size
;
loop
{
loop
{
// final_read_hint because
let
value
=
op
.read_strongly_consistent
()
.await
?
;
// 1. in the retry case we have just invalidated the operation so we need to recompute
// anyway (not wasteful)
// 2. the callers are in top level tasks and the value type inside T is holding a
// non-serializable effects value. This strongly implies the rest of the data is
// ephemeral often just readrefs on other cells. So we don't need to keep it.
let
value
=
op
.read_strongly_consistent
()
.final_read_hint
()
.await
?
;
// Deref the `ReadRef<T>` to the read target (`T` for non-transparent types).
// Deref the `ReadRef<T>` to the read target (`T` for non-transparent types).
let
effects
=
get_effects
(
&*
value
);
let
effects
=
get_effects
(
&*
value
);
match
effects
.apply
()
.await
{
match
effects
.apply
()
.await
{
...
...
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