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
512d7e81
Unverified
Commit
512d7e81
authored
Mar 17, 2026
by
Niklas Mischkulnig
Committed by
GitHub
Mar 17, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turbopack: correctly apply effects for issue snapshots (#91511)
`snapshot_issues` emits effects when `UPDATE=1`
parent
cdec4740
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
snapshot.rs
turbopack/crates/turbopack-tests/tests/snapshot.rs
+10
-4
No files found.
turbopack/crates/turbopack-tests/tests/snapshot.rs
View file @
512d7e81
...
@@ -11,7 +11,7 @@ use rustc_hash::FxHashSet;
...
@@ -11,7 +11,7 @@ use rustc_hash::FxHashSet;
use
serde
::
Deserialize
;
use
serde
::
Deserialize
;
use
serde_json
::
json
;
use
serde_json
::
json
;
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_tasks
::{
Effects
,
ResolvedVc
,
TurboTasks
,
Vc
,
get_effects
,
turbofmt
};
use
turbo_tasks
::{
Effects
,
OperationVc
,
ResolvedVc
,
TurboTasks
,
Vc
,
get_effects
,
turbofmt
};
use
turbo_tasks_backend
::{
BackendOptions
,
TurboTasksBackend
,
noop_backing_storage
};
use
turbo_tasks_backend
::{
BackendOptions
,
TurboTasksBackend
,
noop_backing_storage
};
use
turbo_tasks_env
::
DotenvProcessEnv
;
use
turbo_tasks_env
::
DotenvProcessEnv
;
use
turbo_tasks_fs
::{
use
turbo_tasks_fs
::{
...
@@ -222,7 +222,7 @@ async fn run(resource: PathBuf) -> Result<()> {
...
@@ -222,7 +222,7 @@ async fn run(resource: PathBuf) -> Result<()> {
));
));
tt
.run_once
(
async
move
{
tt
.run_once
(
async
move
{
#[turbo_tasks
::
function(operation)]
#[turbo_tasks
::
function(operation)]
async
fn
inner_operation
(
resource
:
RcStr
)
->
Result
<
Vc
<
Effects
>>
{
async
fn
inner_operation
(
resource
:
RcStr
)
->
Result
<
Vc
<
()
>>
{
let
out_op
=
run_test_operation
(
resource
);
let
out_op
=
run_test_operation
(
resource
);
let
out_vc
=
out_op
.resolve_strongly_consistent
()
.await
?
.owned
()
.await
?
;
let
out_vc
=
out_op
.resolve_strongly_consistent
()
.await
?
.owned
()
.await
?
;
...
@@ -234,10 +234,16 @@ async fn run(resource: PathBuf) -> Result<()> {
...
@@ -234,10 +234,16 @@ async fn run(resource: PathBuf) -> Result<()> {
snapshot_issues
(
plain_issues
,
out_vc
.join
(
"issues"
)
?
,
&
REPO_ROOT
)
snapshot_issues
(
plain_issues
,
out_vc
.join
(
"issues"
)
?
,
&
REPO_ROOT
)
.await
.await
.context
(
"Unable to handle issues"
)
?
;
.context
(
"Unable to handle issues"
)
?
;
Ok
(
Vc
::
cell
(()))
}
Ok
(
get_effects
(
out_op
)
.await
?
.cell
())
#[turbo_tasks
::
function(operation)]
async
fn
extract_effects
(
op
:
OperationVc
<
()
>
)
->
Result
<
Vc
<
Effects
>>
{
let
_
=
op
.resolve_strongly_consistent
()
.await
?
;
Ok
(
get_effects
(
op
)
.await
?
.cell
())
}
}
inner_operation
(
resource
.to_str
()
.unwrap
()
.into
())
extract_effects
(
inner_operation
(
resource
.to_str
()
.unwrap
()
.into
()))
.read_strongly_consistent
()
.read_strongly_consistent
()
.await
?
.await
?
.apply
()
.apply
()
...
...
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