@@ -12,7 +12,7 @@ use crate::{
12
12
manager:: { read_local_output, read_task_cell, read_task_output, with_turbo_tasks} ,
13
13
registry:: { self , get_value_type} ,
14
14
turbo_tasks, CollectiblesSource , ReadCellOptions , ReadConsistency , ResolvedVc , TaskId ,
15
- TraitTypeId , ValueType , ValueTypeId , VcValueTrait ,
15
+ TaskPersistence , TraitTypeId , ValueType , ValueTypeId , VcValueTrait ,
16
16
} ;
17
17
18
18
#[ derive( Error , Debug ) ]
@@ -57,7 +57,7 @@ impl Display for CellId {
57
57
pub enum RawVc {
58
58
TaskOutput ( TaskId ) ,
59
59
TaskCell ( TaskId , CellId ) ,
60
- LocalOutput ( TaskId , ExecutionId , LocalTaskId ) ,
60
+ LocalOutput ( TaskId , TaskPersistence , ExecutionId , LocalTaskId ) ,
61
61
}
62
62
63
63
impl RawVc {
@@ -79,9 +79,8 @@ impl RawVc {
79
79
80
80
pub fn is_transient ( & self ) -> bool {
81
81
match self {
82
- RawVc :: TaskOutput ( task) | RawVc :: TaskCell ( task, ..) | RawVc :: LocalOutput ( task, ..) => {
83
- task. is_transient ( )
84
- }
82
+ RawVc :: TaskOutput ( task) | RawVc :: TaskCell ( task, ..) => task. is_transient ( ) ,
83
+ RawVc :: LocalOutput ( _, persistence, ..) => * persistence == TaskPersistence :: Transient ,
85
84
}
86
85
}
87
86
@@ -145,7 +144,7 @@ impl RawVc {
145
144
return Err ( ResolveTypeError :: NoContent ) ;
146
145
}
147
146
}
148
- RawVc :: LocalOutput ( _task_id, execution_id, local_task_id) => {
147
+ RawVc :: LocalOutput ( _task_id, _persistence , execution_id, local_task_id) => {
149
148
current = read_local_output ( & * tt, execution_id, local_task_id)
150
149
. await
151
150
. map_err ( |source| ResolveTypeError :: TaskError { source } ) ?;
@@ -182,7 +181,7 @@ impl RawVc {
182
181
consistency = ReadConsistency :: Eventual ;
183
182
}
184
183
RawVc :: TaskCell ( _, _) => return Ok ( current) ,
185
- RawVc :: LocalOutput ( _task_id, execution_id, local_task_id) => {
184
+ RawVc :: LocalOutput ( _task_id, _persistence , execution_id, local_task_id) => {
186
185
debug_assert_eq ! ( consistency, ReadConsistency :: Eventual ) ;
187
186
current = read_local_output ( & * tt, execution_id, local_task_id) . await ?;
188
187
}
@@ -197,7 +196,7 @@ impl RawVc {
197
196
let mut current = self ;
198
197
loop {
199
198
match current {
200
- RawVc :: LocalOutput ( _task_id, execution_id, local_task_id) => {
199
+ RawVc :: LocalOutput ( _task_id, _persistence , execution_id, local_task_id) => {
201
200
current = read_local_output ( & * tt, execution_id, local_task_id) . await ?;
202
201
}
203
202
non_local => return Ok ( non_local) ,
@@ -357,7 +356,7 @@ impl Future for ReadRawVcFuture {
357
356
Err ( err) => return Poll :: Ready ( Err ( err) ) ,
358
357
}
359
358
}
360
- RawVc :: LocalOutput ( _task_id, execution_id, local_output_id) => {
359
+ RawVc :: LocalOutput ( _task_id, _persistence , execution_id, local_output_id) => {
361
360
debug_assert_eq ! ( this. consistency, ReadConsistency :: Eventual ) ;
362
361
let read_result = tt. try_read_local_output ( execution_id, local_output_id) ;
363
362
match read_result {
0 commit comments