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
5018dcfb
Commit
5018dcfb
authored
Oct 13, 2025
by
Tobias Koppers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turbopack: remove TaskInput from AutoSet
parent
90bc934b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
33 deletions
+27
-33
task_input.rs
turbopack/crates/turbo-tasks/src/task/task_input.rs
+5
-13
mod.rs
turbopack/crates/turbopack-core/src/issue/mod.rs
+22
-20
No files found.
turbopack/crates/turbo-tasks/src/task/task_input.rs
View file @
5018dcfb
...
...
@@ -19,6 +19,11 @@ use crate::{
/// Trait to implement in order for a type to be accepted as a
/// [`#[turbo_tasks::function]`][crate::function] argument.
///
/// Note that in addition to the trait bounds, the type must also be deterministic serializable when
/// used for a persisted task (is_transient = false). This means serialization of equal values
/// should lead to byte-identical results. This is not enforced by the trait itself, but is required
/// for correct behavior.
pub
trait
TaskInput
:
Send
+
Sync
+
Clone
+
Debug
+
PartialEq
+
Eq
+
Hash
+
TraceRawVcs
{
fn
resolve_input
(
&
self
)
->
impl
Future
<
Output
=
Result
<
Self
>>
+
Send
+
'_
{
async
{
Ok
(
self
.clone
())
}
...
...
@@ -332,19 +337,6 @@ where
}
}
impl
<
T
>
TaskInput
for
auto_hash_map
::
AutoSet
<
T
>
where
T
:
TaskInput
,
{
fn
is_resolved
(
&
self
)
->
bool
{
self
.iter
()
.all
(
TaskInput
::
is_resolved
)
}
fn
is_transient
(
&
self
)
->
bool
{
self
.iter
()
.any
(
TaskInput
::
is_transient
)
}
}
macro_rules!
tuple_impls
{
(
$
(
$name:ident
)
+
)
=>
{
impl
<
$
(
$name
:
TaskInput
),
+>
TaskInput
for
(
$
(
$name
,)
+
)
...
...
turbopack/crates/turbopack-core/src/issue/mod.rs
View file @
5018dcfb
...
...
@@ -6,7 +6,6 @@ pub mod resolve;
use
std
::{
cmp
::
min
,
fmt
::{
Display
,
Formatter
},
sync
::
Arc
,
};
use
anyhow
::{
Result
,
anyhow
};
...
...
@@ -164,9 +163,7 @@ pub trait ImportTracer {
fn
get_traces
(
self
:
Vc
<
Self
>
,
path
:
FileSystemPath
)
->
Vc
<
ImportTraces
>
;
}
#[derive(
Debug,
Clone,
TaskInput,
TraceRawVcs,
Hash,
Eq,
PartialEq,
Serialize,
Deserialize,
NonLocalValue,
)]
#[turbo_tasks
::
value]
pub
struct
DelegatingImportTracer
{
delegates
:
AutoSet
<
ResolvedVc
<
Box
<
dyn
ImportTracer
>>>
,
}
...
...
@@ -220,7 +217,7 @@ pub struct Issues(Vec<ResolvedVc<Box<dyn Issue>>>);
#[derive(Debug)]
pub
struct
CapturedIssues
{
issues
:
AutoSet
<
ResolvedVc
<
Box
<
dyn
Issue
>>>
,
tracer
:
Ar
c
<
DelegatingImportTracer
>
,
tracer
:
ResolvedV
c
<
DelegatingImportTracer
>
,
}
#[turbo_tasks
::
value_impl]
...
...
@@ -250,14 +247,12 @@ impl CapturedIssues {
// Returns all the issues as formatted `PlainIssues`.
pub
async
fn
get_plain_issues
(
&
self
)
->
Result
<
Vec
<
ReadRef
<
PlainIssue
>>>
{
let
mut
list
=
self
.issues
.iter
()
.map
(|
issue
|
async
move
{
PlainIssue
::
from_issue
(
**
issue
,
Some
(
self
.tracer
.clone
()))
.await
})
.try_join
()
.await
?
;
let
mut
list
=
self
.issues
.iter
()
.map
(|
issue
|
async
move
{
PlainIssue
::
from_issue
(
**
issue
,
Some
(
*
self
.tracer
))
.await
})
.try_join
()
.await
?
;
list
.sort
();
Ok
(
list
)
}
...
...
@@ -716,7 +711,7 @@ impl PlainIssue {
#[turbo_tasks
::
function]
pub
async
fn
from_issue
(
issue
:
ResolvedVc
<
Box
<
dyn
Issue
>>
,
import_tracer
:
Option
<
Ar
c
<
DelegatingImportTracer
>>
,
import_tracer
:
Option
<
ResolvedV
c
<
DelegatingImportTracer
>>
,
)
->
Result
<
Vc
<
Self
>>
{
let
description
:
Option
<
StyledString
>
=
match
*
issue
.description
()
.await
?
{
Some
(
description
)
=>
Some
(
description
.owned
()
.await
?
),
...
...
@@ -747,8 +742,13 @@ impl PlainIssue {
},
import_traces
:
match
import_tracer
{
Some
(
tracer
)
=>
{
into_plain_trace
(
tracer
.get_traces
(
issue
.file_path
()
.owned
()
.await
?
)
.await
?
)
.await
?
into_plain_trace
(
tracer
.await
?
.get_traces
(
issue
.file_path
()
.owned
()
.await
?
)
.await
?
,
)
.await
?
}
None
=>
vec!
[],
},
...
...
@@ -835,9 +835,10 @@ where
CapturedIssues
{
issues
:
self
.peek_collectibles
(),
tracer
:
Arc
::
new
(
DelegatingImportTracer
{
tracer
:
DelegatingImportTracer
{
delegates
:
self
.peek_collectibles
(),
}),
}
.resolved_cell
(),
}
}
...
...
@@ -845,9 +846,10 @@ where
CapturedIssues
{
issues
:
self
.take_collectibles
(),
tracer
:
Arc
::
new
(
DelegatingImportTracer
{
tracer
:
DelegatingImportTracer
{
delegates
:
self
.take_collectibles
(),
}),
}
.resolved_cell
(),
}
}
}
...
...
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