Skip to content

Commit 6970e13

Browse files
authored
improve error reporting for fatal errors (vercel/turborepo#3550)
This adds the turbo-tasks function name as `context` of all fatal errors propagated from executing or reading turbo-tasks functions. That should help in debugging fatal errors.
1 parent d518777 commit 6970e13

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

crates/next-core/src/next_client_chunks/with_chunks.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ impl EcmascriptChunkItem for WithChunksChunkItem {
105105
self.context
106106
}
107107

108+
#[turbo_tasks::function]
109+
fn related_path(&self) -> FileSystemPathVc {
110+
self.inner.path()
111+
}
112+
108113
#[turbo_tasks::function]
109114
async fn content(&self) -> Result<EcmascriptChunkItemContentVc> {
110115
let inner = self.inner.await?;

crates/next-core/src/next_client_component/with_client_chunks.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ impl EcmascriptChunkItem for WithClientChunksChunkItem {
105105
self.context
106106
}
107107

108+
#[turbo_tasks::function]
109+
fn related_path(&self) -> FileSystemPathVc {
110+
self.inner.path()
111+
}
112+
108113
#[turbo_tasks::function]
109114
async fn content(&self) -> Result<EcmascriptChunkItemContentVc> {
110115
let inner = self.inner.await?;

0 commit comments

Comments
 (0)