Download next.js/turbopack/crates/turbopack-node/src/render/issue.rs from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.39 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/turbopack/crates/turbopack-node/src/render/issue.rs
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/turbopack/crates/turbopack-node/src/render/issue.rs
-
curl -L -o issue.rs https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/turbopack/crates/turbopack-node/src/render/issue.rs
1.39 kB
| use turbo_rcstr::rcstr; | |
| use turbo_tasks::{ResolvedVc, Vc}; | |
| use turbo_tasks_fs::FileSystemPath; | |
| use turbopack_core::issue::{Issue, IssueStage, OptionStyledString, StyledString}; | |
| pub struct RenderingIssue { | |
| pub file_path: FileSystemPath, | |
| pub message: ResolvedVc<StyledString>, | |
| pub status: Option<i32>, | |
| } | |
| impl Issue for RenderingIssue { | |
| fn title(&self) -> Vc<StyledString> { | |
| StyledString::Text(rcstr!("Error during SSR Rendering")).cell() | |
| } | |
| fn stage(&self) -> Vc<IssueStage> { | |
| IssueStage::CodeGen.cell() | |
| } | |
| fn file_path(&self) -> Vc<FileSystemPath> { | |
| self.file_path.clone().cell() | |
| } | |
| fn description(&self) -> Vc<OptionStyledString> { | |
| Vc::cell(Some(self.message)) | |
| } | |
| fn detail(&self) -> Vc<OptionStyledString> { | |
| let mut details = vec![]; | |
| if let Some(status) = self.status | |
| && status != 0 | |
| { | |
| details.push(StyledString::Text( | |
| format!("Node.js exit code: {status}").into(), | |
| )); | |
| } | |
| Vc::cell(Some(StyledString::Stack(details).resolved_cell())) | |
| } | |
| // TODO parse stack trace into source location | |
| } | |