Unverified Commit 1f39908c authored by Luke Sandberg's avatar Luke Sandberg Committed by GitHub

Remove `subissues` from `Issue` (#79988)

Remove `sub_issues` from Issue representation

It is dead.

Part of PACK-4105
parent 8b9dc851
......@@ -289,7 +289,6 @@ pub struct NapiIssue {
pub detail: Option<serde_json::Value>,
pub source: Option<NapiIssueSource>,
pub documentation_link: String,
pub sub_issues: Vec<NapiIssue>,
}
impl From<&PlainIssue> for NapiIssue {
......@@ -309,11 +308,6 @@ impl From<&PlainIssue> for NapiIssue {
severity: issue.severity.as_str().to_string(),
source: issue.source.as_ref().map(|source| source.into()),
title: serde_json::to_value(StyledStringSerialize::from(&issue.title)).unwrap(),
sub_issues: issue
.sub_issues
.iter()
.map(|issue| (&**issue).into())
.collect(),
}
}
}
......
......@@ -347,7 +347,6 @@ export interface NapiIssue {
detail?: any
source?: NapiIssueSource
documentationLink: string
subIssues: Array<NapiIssue>
}
export interface NapiIssueSource {
source: NapiSource
......
......@@ -95,7 +95,6 @@ export interface Issue {
}
}
documentationLink: string
subIssues: Issue[]
}
export interface Diagnostics {
......
......@@ -148,10 +148,6 @@ pub trait Issue {
Vc::cell(None)
}
fn sub_issues(self: Vc<Self>) -> Vc<Issues> {
Vc::cell(Vec::new())
}
async fn into_plain(
self: Vc<Self>,
processing_path: Vc<OptionIssueProcessingPathItems>,
......@@ -180,15 +176,6 @@ pub trait Issue {
None
}
},
sub_issues: self
.sub_issues()
.await?
.iter()
.map(|i| async move {
anyhow::Ok(i.into_plain(OptionIssueProcessingPathItems::none()).await?)
})
.try_join()
.await?,
processing_path: processing_path.into_plain().await?,
}
.cell())
......@@ -691,7 +678,6 @@ pub struct PlainIssue {
pub documentation_link: RcStr,
pub source: Option<PlainIssueSource>,
pub sub_issues: Vec<ReadRef<PlainIssue>>,
pub processing_path: ReadRef<PlainIssueProcessingPath>,
}
......@@ -714,11 +700,6 @@ fn hash_plain_issue(issue: &PlainIssue, hasher: &mut Xxh3Hash64Hasher, full: boo
}
if full {
hasher.write_value(issue.sub_issues.len());
for i in &issue.sub_issues {
hash_plain_issue(i, hasher, full);
}
hasher.write_ref(&issue.processing_path);
}
}
......
use std::{collections::BTreeMap, fmt::Display, ops::Deref, path::PathBuf};
use std::{collections::BTreeMap, fmt::Display, path::PathBuf};
use serde::{Deserialize, Serialize};
use serde_json::Value;
......@@ -146,7 +146,6 @@ pub struct Issue<'a> {
pub documentation_link: &'a str,
pub source: Option<IssueSource<'a>>,
pub sub_issues: Vec<Issue<'a>>,
pub formatted: String,
}
......@@ -171,7 +170,6 @@ impl<'a> From<&'a PlainIssue> for Issue<'a> {
documentation_link: &plain.documentation_link,
detail: plain.detail.as_ref(),
source,
sub_issues: plain.sub_issues.iter().map(|p| p.deref().into()).collect(),
// TODO(WEB-691) formatting the issue should be handled by the error overlay.
// The browser could handle error formatting in a better way than the text only
// formatting here
......
warning - [analysis] [project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/commonjs.js unexpected export *
export * used with module [project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/commonjs.js [test] (ecmascript) which is a CommonJS module with exports only available at runtime
List all export names manually (`export { a, b, c } from "...") or rewrite the module to ESM, to avoid the additional runtime code.`
List all export names manually (`export { a, b, c } from "...") or rewrite the module to ESM, to avoid the additional runtime code.`
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment