Skip to content

Commit b0facee

Browse files
authored
Turbopack: Move PrettyPrintError to turbo_tasks and add tests (#89280)
### What? Move the error printing logic to turbo_tasks and add test cases for it
1 parent d77e3d4 commit b0facee

File tree

21 files changed

+511
-38
lines changed

21 files changed

+511
-38
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/next-napi-bindings/src/next_api/project.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ use tracing::Instrument;
3636
use tracing_subscriber::{Registry, layer::SubscriberExt, util::SubscriberInitExt};
3737
use turbo_rcstr::{RcStr, rcstr};
3838
use turbo_tasks::{
39-
Effects, FxIndexSet, NonLocalValue, OperationValue, OperationVc, ReadRef, ResolvedVc,
40-
TaskInput, TransientInstance, TryJoinIterExt, TurboTasksApi, UpdateInfo, Vc, get_effects,
39+
Effects, FxIndexSet, NonLocalValue, OperationValue, OperationVc, PrettyPrintError, ReadRef,
40+
ResolvedVc, TaskInput, TransientInstance, TryJoinIterExt, TurboTasksApi, UpdateInfo, Vc,
41+
get_effects,
4142
message_queue::{CompilationEvent, Severity},
4243
trace::TraceRawVcs,
4344
};
@@ -49,7 +50,6 @@ use turbo_unix_path::{get_relative_path_to, sys_to_unix};
4950
use turbopack_core::{
5051
PROJECT_FILESYSTEM_NAME, SOURCE_URL_PROTOCOL,
5152
diagnostics::PlainDiagnostic,
52-
error::PrettyPrintError,
5353
issue::{IssueFilter, PlainIssue},
5454
output::{OutputAsset, OutputAssets},
5555
source_map::{SourceMap, Token},

crates/next-napi-bindings/src/next_api/turbopack_ctx.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use owo_colors::OwoColorize;
1818
use serde::Serialize;
1919
use terminal_hyperlink::Hyperlink;
2020
use turbo_tasks::{
21-
TurboTasks, TurboTasksApi,
21+
PrettyPrintError, TurboTasks, TurboTasksApi,
2222
backend::TurboTasksExecutionError,
2323
message_queue::{CompilationEvent, Severity},
2424
};
@@ -27,7 +27,6 @@ use turbo_tasks_backend::{
2727
TurboTasksBackend, db_invalidation::invalidation_reasons, default_backing_storage,
2828
noop_backing_storage,
2929
};
30-
use turbopack_core::error::PrettyPrintError;
3130

3231
pub type NextTurboTasks =
3332
Arc<TurboTasks<TurboTasksBackend<Either<DefaultBackingStorage, NoopBackingStorage>>>>;

turbopack/crates/turbo-tasks-backend/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ turbo-tasks = { workspace = true }
6464
[dev-dependencies]
6565
criterion = { workspace = true, features = ["async_tokio"] }
6666
futures = { workspace = true }
67+
indoc = { workspace = true }
6768
regex = { workspace = true }
6869
tempfile = { workspace = true }
6970
turbo-tasks-malloc = { workspace = true }

0 commit comments

Comments
 (0)