diff --git a/turbopack/crates/turbopack-core/src/introspect/module.rs b/turbopack/crates/turbopack-core/src/introspect/module.rs index 2875d9bc0f52d..b4b2401a80e52 100644 --- a/turbopack/crates/turbopack-core/src/introspect/module.rs +++ b/turbopack/crates/turbopack-core/src/introspect/module.rs @@ -1,6 +1,6 @@ use anyhow::Result; use turbo_rcstr::RcStr; -use turbo_tasks::{ValueToString, Vc}; +use turbo_tasks::{ResolvedVc, ValueToString, Vc}; use super::{ utils::{children_from_module_references, content_to_details}, @@ -8,16 +8,16 @@ use super::{ }; use crate::{asset::Asset, module::Module}; -#[turbo_tasks::value(local)] -pub struct IntrospectableModule(Vc>); +#[turbo_tasks::value] +pub struct IntrospectableModule(ResolvedVc>); #[turbo_tasks::value_impl] impl IntrospectableModule { #[turbo_tasks::function] - pub async fn new(asset: Vc>) -> Result>> { - Ok(Vc::try_resolve_sidecast::>(asset) + pub async fn new(asset: ResolvedVc>) -> Result>> { + Ok(*ResolvedVc::try_sidecast::>(asset) .await? - .unwrap_or_else(|| Vc::upcast(IntrospectableModule(asset).cell()))) + .unwrap_or_else(|| ResolvedVc::upcast(IntrospectableModule(asset).resolved_cell()))) } } diff --git a/turbopack/crates/turbopack-core/src/introspect/source.rs b/turbopack/crates/turbopack-core/src/introspect/source.rs index 687c09a91de4b..456013615ffc5 100644 --- a/turbopack/crates/turbopack-core/src/introspect/source.rs +++ b/turbopack/crates/turbopack-core/src/introspect/source.rs @@ -1,20 +1,20 @@ use anyhow::Result; use turbo_rcstr::RcStr; -use turbo_tasks::{ValueToString, Vc}; +use turbo_tasks::{ResolvedVc, ValueToString, Vc}; use super::{utils::content_to_details, Introspectable}; use crate::{asset::Asset, source::Source}; -#[turbo_tasks::value(local)] -pub struct IntrospectableSource(Vc>); +#[turbo_tasks::value] +pub struct IntrospectableSource(ResolvedVc>); #[turbo_tasks::value_impl] impl IntrospectableSource { #[turbo_tasks::function] - pub async fn new(asset: Vc>) -> Result>> { - Ok(Vc::try_resolve_sidecast::>(asset) + pub async fn new(asset: ResolvedVc>) -> Result>> { + Ok(*ResolvedVc::try_sidecast::>(asset) .await? - .unwrap_or_else(|| Vc::upcast(IntrospectableSource(asset).cell()))) + .unwrap_or_else(|| ResolvedVc::upcast(IntrospectableSource(asset).resolved_cell()))) } }