We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad55fcc commit 760abafCopy full SHA for 760abaf
turbopack/crates/turbo-tasks-backend/src/backend/mod.rs
@@ -592,6 +592,14 @@ impl Backend for TurboTasksBackend {
592
parent_task: TaskId,
593
turbo_tasks: &dyn TurboTasksBackendApi<Self>,
594
) -> TaskId {
595
+ if !parent_task.is_transient() {
596
+ let parent_task_type = self.lookup_task_type(parent_task);
597
+ panic!(
598
+ "Calling transient function {} from persistent function function {} is not allowed",
599
+ task_type.get_name(),
600
+ parent_task_type.map_or_else(|| "unknown".into(), |t| t.get_name())
601
+ );
602
+ }
603
if let Some(task_id) = self.task_cache.lookup_forward(&task_type) {
604
self.connect_child(parent_task, task_id, turbo_tasks);
605
return task_id;
0 commit comments