Skip to content
Merged
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 crates/next-api/src/module_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ impl Issue for CssGlobalImportIssue {

#[turbo_tasks::function]
fn stage(&self) -> Vc<IssueStage> {
IssueStage::ProcessModule.into()
IssueStage::ProcessModule.cell()
}

// TODO(PACK-4879): compute the source information by following the module references
Expand Down
2 changes: 1 addition & 1 deletion crates/next-core/src/middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ struct MiddlewareMissingExportIssue {
impl Issue for MiddlewareMissingExportIssue {
#[turbo_tasks::function]
fn stage(&self) -> Vc<IssueStage> {
IssueStage::Transform.into()
IssueStage::Transform.cell()
}

fn severity(&self) -> IssueSeverity {
Expand Down
2 changes: 1 addition & 1 deletion crates/next-core/src/next_app/app_route_entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub async fn get_app_route_entry(
let config = if let Some(original_segment_config) = original_segment_config {
let mut segment_config = segment_from_source.owned().await?;
segment_config.apply_parent_config(&*original_segment_config.await?);
segment_config.into()
segment_config.cell()
} else {
segment_from_source
};
Expand Down
2 changes: 1 addition & 1 deletion crates/next-core/src/next_app/metadata/route.rs
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ impl Issue for StaticMetadataFileSizeIssue {

#[turbo_tasks::function]
fn stage(&self) -> Vc<IssueStage> {
IssueStage::ProcessModule.into()
IssueStage::ProcessModule.cell()
}

#[turbo_tasks::function]
Expand Down
8 changes: 4 additions & 4 deletions crates/next-core/src/next_font/google/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ impl NextFontGoogleReplacer {
impl ImportMappingReplacement for NextFontGoogleReplacer {
#[turbo_tasks::function]
fn replace(&self, _capture: Vc<Pattern>) -> Vc<ReplacedImportMapping> {
ReplacedImportMapping::Ignore.into()
ReplacedImportMapping::Ignore.cell()
}

/// Intercepts requests for `next/font/google/target.css` and returns a
Expand All @@ -166,14 +166,14 @@ impl ImportMappingReplacement for NextFontGoogleReplacer {
fragment: _,
} = request
else {
return Ok(ImportMapResult::NoEntry.into());
return Ok(ImportMapResult::NoEntry.cell());
};

let this = &*self.await?;
if can_use_next_font(this.project_path.clone(), query).await? {
Ok(self.import_map_result(query.clone()))
} else {
Ok(ImportMapResult::NoEntry.into())
Ok(ImportMapResult::NoEntry.cell())
}
}
}
Expand Down Expand Up @@ -338,7 +338,7 @@ impl NextFontGoogleCssModuleReplacer {
impl ImportMappingReplacement for NextFontGoogleCssModuleReplacer {
#[turbo_tasks::function]
fn replace(&self, _capture: Vc<Pattern>) -> Vc<ReplacedImportMapping> {
ReplacedImportMapping::Ignore.into()
ReplacedImportMapping::Ignore.cell()
}

/// Intercepts requests for the css module made by the virtual JavaScript
Expand Down
2 changes: 1 addition & 1 deletion crates/next-core/src/next_font/issue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub(crate) struct NextFontIssue {
impl Issue for NextFontIssue {
#[turbo_tasks::function]
fn stage(&self) -> Vc<IssueStage> {
IssueStage::CodeGen.into()
IssueStage::CodeGen.cell()
}

fn severity(&self) -> IssueSeverity {
Expand Down
2 changes: 1 addition & 1 deletion crates/next-core/src/next_font/local/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ impl BeforeResolvePlugin for NextFontLocalResolvePlugin {
"{}.js",
get_request_id(options_vc.font_family().await?, request_hash)
))?,
AssetContent::file(FileContent::Content(file_content.into()).into()),
AssetContent::file(FileContent::Content(file_content.into()).cell()),
)
.to_resolved()
.await?;
Expand Down
2 changes: 1 addition & 1 deletion crates/next-core/src/next_import_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ impl Issue for MissingNextFolderIssue {

#[turbo_tasks::function]
fn stage(&self) -> Vc<IssueStage> {
IssueStage::Resolve.into()
IssueStage::Resolve.cell()
}

#[turbo_tasks::function]
Expand Down
4 changes: 2 additions & 2 deletions crates/next-core/src/next_server/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use turbopack_core::{

/// The predicated based on which the [ExternalCjsModulesResolvePlugin] decides
/// whether to mark a module as external.
#[turbo_tasks::value(into = "shared")]
#[turbo_tasks::value(shared)]
pub enum ExternalPredicate {
/// Mark all modules as external if they're not listed in the list.
/// Applies only to imports outside of node_modules.
Expand Down Expand Up @@ -483,7 +483,7 @@ impl Issue for ExternalizeIssue {

#[turbo_tasks::function]
fn stage(&self) -> Vc<IssueStage> {
IssueStage::Config.into()
IssueStage::Config.cell()
}

#[turbo_tasks::function]
Expand Down
2 changes: 1 addition & 1 deletion crates/next-core/src/next_shared/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl Issue for InvalidImportModuleIssue {

#[turbo_tasks::function]
fn stage(&self) -> Vc<IssueStage> {
IssueStage::Resolve.into()
IssueStage::Resolve.cell()
}

#[turbo_tasks::function]
Expand Down
2 changes: 1 addition & 1 deletion crates/next-core/src/next_shared/webpack_rules/babel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ struct BabelPluginReactCompilerResolutionIssue {
impl Issue for BabelPluginReactCompilerResolutionIssue {
#[turbo_tasks::function]
fn stage(&self) -> Vc<IssueStage> {
IssueStage::Transform.into()
IssueStage::Transform.cell()
}

fn severity(&self) -> IssueSeverity {
Expand Down
2 changes: 1 addition & 1 deletion crates/next-core/src/raw_ecmascript_module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ impl EcmascriptChunkItem for RawEcmascriptChunkItem {
},
..Default::default()
}
.into())
.cell())
}
.instrument(span)
.await
Expand Down
2 changes: 1 addition & 1 deletion crates/next-core/src/segment_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ impl Issue for NextSegmentConfigParsingIssue {

#[turbo_tasks::function]
fn stage(&self) -> Vc<IssueStage> {
IssueStage::Parse.into()
IssueStage::Parse.cell()
}

#[turbo_tasks::function]
Expand Down
2 changes: 1 addition & 1 deletion turbopack/crates/turbo-tasks-backend/tests/all_in_one.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async fn all_in_one() {
value: 42,
next: Some(MyStructValue::new(a).to_resolved().await?),
}
.into();
.cell();

let result = my_function(a, b.get_last(), c, MyEnumValue::Yeah(42));
assert_eq!(*result.my_trait_function().await?, "42");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use turbo_tasks_testing::{Registration, register, run_once};

static REGISTRATION: Registration = register!();

// Test that with `cell = "shared"`, the cell will be re-used as long as the
// Test that with `cell = "compare"`, the cell will be re-used as long as the
// value is equal.
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn test_trait_ref_shared_cell_mode() {
Expand All @@ -32,7 +32,7 @@ async fn test_trait_ref_shared_cell_mode() {
assert_eq!(*TraitRef::cell(trait_ref.clone()).get_value().await?, 42);
}

// because we're using `cell = "shared"`, these trait refs must use the same
// because we're using `cell = "compare"`, these trait refs must use the same
// underlying Arc/SharedRef (by identity)
assert!(TraitRef::ptr_eq(&trait_ref_a, &trait_ref_b));

Expand Down Expand Up @@ -83,7 +83,7 @@ trait ValueTrait {
fn get_value(&self) -> Vc<usize>;
}

#[turbo_tasks::value(transparent, cell = "shared")]
#[turbo_tasks::value(transparent, cell = "compare")]
struct SharedValue(usize);

#[turbo_tasks::value(transparent, cell = "new")]
Expand Down
2 changes: 1 addition & 1 deletion turbopack/crates/turbo-tasks-fetch/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ impl Issue for FetchIssue {

#[turbo_tasks::function]
fn stage(&self) -> Vc<IssueStage> {
IssueStage::Load.into()
IssueStage::Load.cell()
}

#[turbo_tasks::function]
Expand Down
10 changes: 5 additions & 5 deletions turbopack/crates/turbo-tasks-fs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2201,25 +2201,25 @@ impl FileContent {

#[turbo_tasks::function]
pub fn parse_json(&self) -> Result<Vc<FileJsonContent>> {
Ok(self.parse_json_ref().into())
Ok(self.parse_json_ref().cell())
}

#[turbo_tasks::function]
pub async fn parse_json_with_comments(self: Vc<Self>) -> Result<Vc<FileJsonContent>> {
let this = self.await?;
Ok(this.parse_json_with_comments_ref().into())
Ok(this.parse_json_with_comments_ref().cell())
}

#[turbo_tasks::function]
pub async fn parse_json5(self: Vc<Self>) -> Result<Vc<FileJsonContent>> {
let this = self.await?;
Ok(this.parse_json5_ref().into())
Ok(this.parse_json5_ref().cell())
}

#[turbo_tasks::function]
pub async fn lines(self: Vc<Self>) -> Result<Vc<FileLinesContent>> {
let this = self.await?;
Ok(this.lines_ref().into())
Ok(this.lines_ref().cell())
}

#[turbo_tasks::function]
Expand Down Expand Up @@ -2464,7 +2464,7 @@ impl FileSystem for NullFileSystem {

#[turbo_tasks::function]
fn read_link(&self, _fs_path: FileSystemPath) -> Vc<LinkContent> {
LinkContent::NotFound.into()
LinkContent::NotFound.cell()
}

#[turbo_tasks::function]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pub fn generic_type(input: TokenStream) -> TokenStream {
turbo_tasks::VcTransparentRead<#ty, #ty, #repr>
},
quote! {
turbo_tasks::VcCellSharedMode<#ty>
turbo_tasks::VcCellCompareMode<#ty>
},
quote! {
turbo_tasks::ValueType::new_with_any_serialization::<#repr>(#name)
Expand Down
2 changes: 1 addition & 1 deletion turbopack/crates/turbo-tasks-macros/src/primitive_macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub fn primitive(input: TokenStream) -> TokenStream {
turbo_tasks::VcTransparentRead<#ty, #ty, #ty>
},
quote! {
turbo_tasks::VcCellSharedMode<#ty>
turbo_tasks::VcCellCompareMode<#ty>
},
quote! {
turbo_tasks::ValueType::new_with_any_serialization::<#ty>(#name)
Expand Down
Loading
Loading