diff --git a/crates/turbopack-core/src/issue/mod.rs b/crates/turbopack-core/src/issue/mod.rs index 99c14a49ce5d9..e14105e27e1f1 100644 --- a/crates/turbopack-core/src/issue/mod.rs +++ b/crates/turbopack-core/src/issue/mod.rs @@ -1,7 +1,6 @@ pub mod analyze; pub mod code_gen; pub mod resolve; -pub mod unsupported_module; use std::{ cmp::{min, Ordering}, diff --git a/crates/turbopack-core/src/issue/unsupported_module.rs b/crates/turbopack-core/src/issue/unsupported_module.rs deleted file mode 100644 index 0c870de69712b..0000000000000 --- a/crates/turbopack-core/src/issue/unsupported_module.rs +++ /dev/null @@ -1,57 +0,0 @@ -use anyhow::Result; -use turbo_tasks::{RcStr, Vc}; -use turbo_tasks_fs::FileSystemPath; - -use super::{Issue, IssueSeverity, IssueStage, OptionStyledString, StyledString}; - -#[turbo_tasks::value(shared)] -pub struct UnsupportedModuleIssue { - pub file_path: Vc, - pub package: RcStr, - pub package_path: Option, -} - -#[turbo_tasks::value_impl] -impl Issue for UnsupportedModuleIssue { - #[turbo_tasks::function] - fn severity(&self) -> Vc { - IssueSeverity::Warning.into() - } - - #[turbo_tasks::function] - fn stage(&self) -> Vc { - IssueStage::ProcessModule.into() - } - - #[turbo_tasks::function] - fn title(&self) -> Vc { - StyledString::Text("Unsupported module".into()).cell() - } - - #[turbo_tasks::function] - fn file_path(&self) -> Vc { - self.file_path - } - - #[turbo_tasks::function] - async fn description(&self) -> Result> { - Ok(Vc::cell(Some( - StyledString::Line(vec![ - StyledString::Text("The ".into()), - StyledString::Text( - match &self.package_path { - Some(_) => "module", - None => "package", - } - .into(), - ), - StyledString::Code(match &self.package_path { - Some(path) => format!(" {}{}", self.package, path).into(), - None => format!(" {}", self.package).into(), - }), - StyledString::Text(" is not yet supported".into()), - ]) - .cell(), - ))) - } -}