Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(turbo-tasks): Turn on local_resolution feature by default #75051

Open
wants to merge 2 commits into
base: bgw/operation-strong-resolve
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion turbopack/crates/turbo-tasks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2021"
bench = false

[features]
default = []
default = ["local_resolution"]
tokio_tracing = ["tokio/tracing"]
hanging_detection = []
local_resolution = []
Expand Down
8 changes: 4 additions & 4 deletions turbopack/crates/turbopack-tests/tests/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ async fn run(resource: PathBuf, snapshot_mode: IssueSnapshotMode) -> Result<JsRe
tt.run_once(async move {
let emit_op =
run_inner_operation(resource.to_str().unwrap().into(), Value::new(snapshot_mode));
let result = emit_op.connect().strongly_consistent().await?;
let result = emit_op.read_strongly_consistent().await?;
apply_effects(emit_op).await?;

Ok(result.clone_value())
Expand Down Expand Up @@ -452,12 +452,12 @@ async fn run_test_operation(prepared_test: ResolvedVc<PreparedTest>) -> Result<V
#[turbo_tasks::function]
async fn snapshot_issues(
prepared_test: Vc<PreparedTest>,
run_result: OperationVc<RunTestResult>,
run_result_op: OperationVc<RunTestResult>,
) -> Result<Vc<()>> {
let PreparedTest { path, .. } = *prepared_test.await?;
let _ = run_result.connect().resolve_strongly_consistent().await;
let _ = run_result_op.resolve_strongly_consistent().await;

let captured_issues = run_result.peek_issues_with_path().await?;
let captured_issues = run_result_op.peek_issues_with_path().await?;

let plain_issues = captured_issues
.iter_with_shortest_path()
Expand Down
5 changes: 2 additions & 3 deletions turbopack/crates/turbopack-tests/tests/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ async fn run(resource: PathBuf) -> Result<()> {
let tt = TurboTasks::new(MemoryBackend::default());
let task = tt.spawn_once_task(async move {
let emit_op = run_inner_operation(resource.to_str().unwrap().into());
emit_op.connect().strongly_consistent().await?;
emit_op.read_strongly_consistent().await?;
apply_effects(emit_op).await?;

Ok(Vc::<()>::default())
Expand All @@ -173,8 +173,7 @@ async fn run(resource: PathBuf) -> Result<()> {
#[turbo_tasks::function(operation)]
async fn run_inner_operation(resource: RcStr) -> Result<()> {
let out_op = run_test_operation(resource);
let out_vc = out_op.connect();
let _ = out_vc.resolve_strongly_consistent().await?;
let out_vc = out_op.resolve_strongly_consistent().await?;
let captured_issues = out_op.peek_issues_with_path().await?;

let plain_issues = captured_issues
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ error - [code gen] [project]/turbopack/crates/turbopack-tests/tests/snapshot/imp

Debug info:
- An error occurred while generating the chunk item [project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/json/input/invalid.json (json)
- Execution of *EcmascriptChunkItemContent::module_factory failed
- Execution of <JsonChunkItem as EcmascriptChunkItem>::content failed
- Unable to make a module from invalid JSON: expected `,` or `}` at line 3 column 26
at nested.?
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading