Skip to content
Draft
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
23 changes: 22 additions & 1 deletion Cargo.lock

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

6 changes: 6 additions & 0 deletions crates/next-build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@ next-core = { workspace = true }
turbopack-core = { workspace = true }
turbo-rcstr = { workspace = true }


# Dev-only link of `turbo-tasks-backend` so the `__tt_static_*` extern
# symbols resolve in this crate's test binary. See the matching
# `extern crate` in `src/lib.rs`.
[dev-dependencies]
turbo-tasks-backend = { workspace = true }
5 changes: 5 additions & 0 deletions crates/next-build/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#![feature(arbitrary_self_types)]
#![feature(arbitrary_self_types_pointers)]

// Force linking `turbo-tasks-backend`'s `__tt_static_*` providers into
// this crate's test binary; see the matching dev-dep in `Cargo.toml`.
#[cfg(test)]
extern crate turbo_tasks_backend;

pub mod build_options;

pub use self::build_options::BuildOptions;
6 changes: 6 additions & 0 deletions crates/next-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ turbopack-resolve = { workspace = true }
turbopack-static = { workspace = true }
turbopack-trace-utils = { workspace = true }

# Dev-only link of `turbo-tasks-backend` so the `__tt_static_*` extern
# symbols resolve in this crate's test binary. See the matching `extern
# crate` in `src/lib.rs`.
[dev-dependencies]
turbo-tasks-backend = { workspace = true }

[features]
default = ["process_pool"]
process_pool = ["turbopack-node/process_pool"]
Expand Down
5 changes: 5 additions & 0 deletions crates/next-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
#![feature(arbitrary_self_types)]
#![feature(arbitrary_self_types_pointers)]

// Force linking `turbo-tasks-backend`'s `__tt_static_*` providers into
// this crate's test binary; see the matching dev-dep in `Cargo.toml`.
#[cfg(test)]
extern crate turbo_tasks_backend;

mod app_page_loader_tree;
pub mod app_structure;
mod base_loader_tree;
Expand Down
8 changes: 8 additions & 0 deletions turbopack/crates/turbo-esregex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,13 @@ regex = { workspace = true }
regress = { workspace = true }
turbo-tasks = { workspace = true }

# Dev-only link of `turbo-tasks-backend` so the `__tt_static_*` extern
# symbols in `libturbo_tasks.rlib` resolve in this crate's test binary.
# Without something in this crate referencing `turbo-tasks-backend` from
# Rust, rustc wouldn't put its rlib in the link command. See the
# matching `extern crate` in `src/lib.rs`.
[dev-dependencies]
turbo-tasks-backend = { workspace = true }

[lints]
workspace = true
6 changes: 6 additions & 0 deletions turbopack/crates/turbo-esregex/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#![feature(arbitrary_self_types_pointers)]

// Force the linker to pull in `turbo-tasks-backend`'s `__tt_static_*`
// providers for this crate's test binary. See the matching dev-dep in
// `Cargo.toml`.
#[cfg(test)]
extern crate turbo_tasks_backend;

use std::vec;

use anyhow::{Result, bail};
Expand Down
1 change: 1 addition & 0 deletions turbopack/crates/turbo-tasks-backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ workspace = true

[features]
default = []

print_cache_item_size_with_compressed = ["print_cache_item_size", "dep:lzzzz"]
print_cache_item_size = []
no_fast_stale = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pub fn scope_stress(c: &mut Criterion) {
storage_mode: None,
..Default::default()
},
// Wrap to match `ProdBackingStorage`.
noop_backing_storage(),
));
async move {
Expand Down
2 changes: 1 addition & 1 deletion turbopack/crates/turbo-tasks-backend/src/backend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {

return result.map_err(|error| {
self.task_error_to_turbo_tasks_execution_error(&error, &mut ctx)
.with_task_context(task_id, turbo_tasks.pin())
.with_task_context(task_id, turbo_tasks::turbo_tasks())
.into()
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ use tracing::info_span;
use tracing::trace_span;
use turbo_tasks::{
CellId, DynTaskInputs, FxIndexMap, RawVc, SharedReference, TaskExecutionReason, TaskId,
TaskPriority, TurboTasksBackendApi, TurboTasksCallApi, backend::CachedTaskType,
macro_helpers::NativeFunction,
TaskPriority, TurboTasksBackendApi, backend::CachedTaskType, macro_helpers::NativeFunction,
};

pub use self::aggregation_update::ComputeDirtyAndCleanUpdate;
Expand Down Expand Up @@ -97,7 +96,7 @@ pub trait ExecuteContext<'e>: Sized {
fn suspending_requested(&self) -> bool;
fn should_track_dependencies(&self) -> bool;
fn should_track_activeness(&self) -> bool;
fn turbo_tasks(&self) -> Arc<dyn TurboTasksCallApi>;
fn turbo_tasks(&self) -> turbo_tasks::TurboTasksHandle;
/// Look up a TaskId from the backing storage for a given task type.
///
/// Uses hash-based lookup which may return multiple candidates due to hash collisions,
Expand Down Expand Up @@ -976,8 +975,8 @@ impl<'e, B: BackingStorage> ExecuteContext<'e> for ExecuteContextImpl<'e, B> {
self.backend.should_track_activeness()
}

fn turbo_tasks(&self) -> Arc<dyn TurboTasksCallApi> {
self.turbo_tasks.pin()
fn turbo_tasks(&self) -> turbo_tasks::TurboTasksHandle {
turbo_tasks::turbo_tasks()
}

fn task_by_type(
Expand Down
Loading
Loading