Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(turbopack): Sort issues #62566

Merged
merged 15 commits into from
Feb 27, 2024
68 changes: 34 additions & 34 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ swc_core = { version = "0.90.10", features = [
testing = { version = "0.35.18" }

# Turbo crates
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240226.1" }
turbopack-binding = { git = "https://github.com/vercel/turbo.git", branch = "kdy1/pack-2440" } # last tag: "turbopack-240226.1"
# [TODO]: need to refactor embed_directory! macro usages, as well as resolving turbo_tasks::function, macros..
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240226.1" }
turbo-tasks = { git = "https://github.com/vercel/turbo.git", branch = "kdy1/pack-2440" } # last tag: "turbopack-240226.1"
# [TODO]: need to refactor embed_directory! macro usage in next-core
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240226.1" }
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", branch = "kdy1/pack-2440" } # last tag: "turbopack-240226.1"

# General Deps

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ use turbopack_binding::{
file_source::FileSource,
ident::AssetIdent,
issue::{
Issue, IssueExt, IssueSeverity, IssueSource, OptionIssueSource, OptionStyledString,
StyledString,
Issue, IssueExt, IssueSeverity, IssueSource, IssueStage, OptionIssueSource,
OptionStyledString, StyledString,
},
source::Source,
},
Expand Down Expand Up @@ -177,6 +177,11 @@ impl Issue for NextSegmentConfigParsingIssue {
Vc::cell("parsing".to_string())
}

#[turbo_tasks::function]
fn stage(&self) -> Vc<IssueStage> {
IssueStage::Parse.into()
}

#[turbo_tasks::function]
fn file_path(&self) -> Vc<FileSystemPath> {
self.ident.path()
Expand Down
9 changes: 8 additions & 1 deletion packages/next-swc/crates/next-core/src/app_structure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ use turbo_tasks::{
};
use turbopack_binding::{
turbo::tasks_fs::{DirectoryContent, DirectoryEntry, FileSystemEntryType, FileSystemPath},
turbopack::core::issue::{Issue, IssueExt, IssueSeverity, OptionStyledString, StyledString},
turbopack::core::issue::{
Issue, IssueExt, IssueSeverity, IssueStage, OptionStyledString, StyledString,
},
};

use crate::{
Expand Down Expand Up @@ -1221,6 +1223,11 @@ impl Issue for DirectoryTreeIssue {
Vc::cell("next app".to_string())
}

#[turbo_tasks::function]
fn stage(&self) -> Vc<IssueStage> {
IssueStage::Load.into()
kdy1 marked this conversation as resolved.
Show resolved Hide resolved
}

#[turbo_tasks::function]
fn file_path(&self) -> Vc<FileSystemPath> {
self.app_dir
Expand Down
7 changes: 6 additions & 1 deletion packages/next-swc/crates/next-core/src/babel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use turbopack_binding::{
turbo::tasks_fs::{FileSystemEntryType, FileSystemPath},
turbopack::{
core::{
issue::{Issue, IssueExt, IssueSeverity, OptionStyledString, StyledString},
issue::{Issue, IssueExt, IssueSeverity, IssueStage, OptionStyledString, StyledString},
reference_type::{CommonJsReferenceSubType, ReferenceType},
resolve::{parse::Request, pattern::Pattern, resolve},
},
Expand Down Expand Up @@ -158,6 +158,11 @@ impl Issue for BabelIssue {
Vc::cell("other".to_string())
}

#[turbo_tasks::function]
fn stage(&self) -> Vc<IssueStage> {
IssueStage::Transform.into()
}

#[turbo_tasks::function]
fn severity(&self) -> Vc<IssueSeverity> {
self.severity
Expand Down