Skip to content

Commit 1f39908

Browse files
authored
Remove subissues from Issue (#79988)
Remove `sub_issues` from Issue representation It is dead. Part of PACK-4105
1 parent 8b9dc85 commit 1f39908

File tree

29 files changed

+2
-32
lines changed

29 files changed

+2
-32
lines changed

crates/napi/src/next_api/utils.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ pub struct NapiIssue {
289289
pub detail: Option<serde_json::Value>,
290290
pub source: Option<NapiIssueSource>,
291291
pub documentation_link: String,
292-
pub sub_issues: Vec<NapiIssue>,
293292
}
294293

295294
impl From<&PlainIssue> for NapiIssue {
@@ -309,11 +308,6 @@ impl From<&PlainIssue> for NapiIssue {
309308
severity: issue.severity.as_str().to_string(),
310309
source: issue.source.as_ref().map(|source| source.into()),
311310
title: serde_json::to_value(StyledStringSerialize::from(&issue.title)).unwrap(),
312-
sub_issues: issue
313-
.sub_issues
314-
.iter()
315-
.map(|issue| (&**issue).into())
316-
.collect(),
317311
}
318312
}
319313
}

packages/next/src/build/swc/generated-native.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,6 @@ export interface NapiIssue {
347347
detail?: any
348348
source?: NapiIssueSource
349349
documentationLink: string
350-
subIssues: Array<NapiIssue>
351350
}
352351
export interface NapiIssueSource {
353352
source: NapiSource

packages/next/src/build/swc/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ export interface Issue {
9595
}
9696
}
9797
documentationLink: string
98-
subIssues: Issue[]
9998
}
10099

101100
export interface Diagnostics {

turbopack/crates/turbopack-core/src/issue/mod.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,6 @@ pub trait Issue {
148148
Vc::cell(None)
149149
}
150150

151-
fn sub_issues(self: Vc<Self>) -> Vc<Issues> {
152-
Vc::cell(Vec::new())
153-
}
154-
155151
async fn into_plain(
156152
self: Vc<Self>,
157153
processing_path: Vc<OptionIssueProcessingPathItems>,
@@ -180,15 +176,6 @@ pub trait Issue {
180176
None
181177
}
182178
},
183-
sub_issues: self
184-
.sub_issues()
185-
.await?
186-
.iter()
187-
.map(|i| async move {
188-
anyhow::Ok(i.into_plain(OptionIssueProcessingPathItems::none()).await?)
189-
})
190-
.try_join()
191-
.await?,
192179
processing_path: processing_path.into_plain().await?,
193180
}
194181
.cell())
@@ -691,7 +678,6 @@ pub struct PlainIssue {
691678
pub documentation_link: RcStr,
692679

693680
pub source: Option<PlainIssueSource>,
694-
pub sub_issues: Vec<ReadRef<PlainIssue>>,
695681
pub processing_path: ReadRef<PlainIssueProcessingPath>,
696682
}
697683

@@ -714,11 +700,6 @@ fn hash_plain_issue(issue: &PlainIssue, hasher: &mut Xxh3Hash64Hasher, full: boo
714700
}
715701

716702
if full {
717-
hasher.write_value(issue.sub_issues.len());
718-
for i in &issue.sub_issues {
719-
hash_plain_issue(i, hasher, full);
720-
}
721-
722703
hasher.write_ref(&issue.processing_path);
723704
}
724705
}

turbopack/crates/turbopack-ecmascript-hmr-protocol/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{collections::BTreeMap, fmt::Display, ops::Deref, path::PathBuf};
1+
use std::{collections::BTreeMap, fmt::Display, path::PathBuf};
22

33
use serde::{Deserialize, Serialize};
44
use serde_json::Value;
@@ -146,7 +146,6 @@ pub struct Issue<'a> {
146146
pub documentation_link: &'a str,
147147

148148
pub source: Option<IssueSource<'a>>,
149-
pub sub_issues: Vec<Issue<'a>>,
150149

151150
pub formatted: String,
152151
}
@@ -171,7 +170,6 @@ impl<'a> From<&'a PlainIssue> for Issue<'a> {
171170
documentation_link: &plain.documentation_link,
172171
detail: plain.detail.as_ref(),
173172
source,
174-
sub_issues: plain.sub_issues.iter().map(|p| p.deref().into()).collect(),
175173
// TODO(WEB-691) formatting the issue should be handled by the error overlay.
176174
// The browser could handle error formatting in a better way than the text only
177175
// formatting here
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
warning - [analysis] [project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/commonjs.js unexpected export *
22
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
3-
List all export names manually (`export { a, b, c } from "...") or rewrite the module to ESM, to avoid the additional runtime code.`
4-
3+
List all export names manually (`export { a, b, c } from "...") or rewrite the module to ESM, to avoid the additional runtime code.`

0 commit comments

Comments
 (0)