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

refactor(turbopack): Use ResolvedVc<T> for struct fields in next-core #73310

Merged
merged 2 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions crates/next-core/src/app_segment_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,10 @@ impl NextSegmentConfig {
/// An issue that occurred while parsing the app segment config.
#[turbo_tasks::value(shared)]
pub struct NextSegmentConfigParsingIssue {
// no-resolved-vc(kdy1): I'll resolve this later because it's a complex case.
ident: Vc<AssetIdent>,
detail: ResolvedVc<StyledString>,
// no-resolved-vc(kdy1): I'll resolve this later because it's a complex case.
source: Vc<IssueSource>,
}

Expand Down Expand Up @@ -433,6 +435,7 @@ fn parse_config_value(
"Values of the `preferredRegion` array need to static strings",
&item,
);
return;
}
}
regions
Expand Down
3 changes: 2 additions & 1 deletion crates/next-core/src/app_structure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ fn match_parallel_route(name: &str) -> Option<&str> {

fn conflict_issue(
app_dir: Vc<FileSystemPath>,
e: &OccupiedEntry<AppPath, Entrypoint>,
e: &'_ OccupiedEntry<'_, AppPath, Entrypoint>,
a: &str,
b: &str,
value_a: &AppPage,
Expand Down Expand Up @@ -1419,6 +1419,7 @@ pub async fn get_global_metadata(
#[turbo_tasks::value(shared)]
struct DirectoryTreeIssue {
pub severity: ResolvedVc<IssueSeverity>,
// no-resolved-vc(kdy1): I'll resolve this later because it's a complex case.
pub app_dir: Vc<FileSystemPath>,
pub message: ResolvedVc<StyledString>,
}
Expand Down
5 changes: 3 additions & 2 deletions crates/next-core/src/next_font/local/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ impl BeforeResolvePlugin for NextFontLocalResolvePlugin {
let font_fallbacks = get_font_fallbacks(lookup_path, options_vc);
let properties = get_font_css_properties(options_vc, font_fallbacks).await;

let lookup_path = lookup_path.to_resolved().await?;
if let Err(e) = &properties {
for source_error in e.chain() {
if let Some(FontError::FontFileNotFound(font_path)) =
Expand Down Expand Up @@ -319,7 +320,7 @@ async fn font_file_options_from_query_map(
#[turbo_tasks::value(shared)]
struct FontResolvingIssue {
font_path: ResolvedVc<RcStr>,
origin_path: Vc<FileSystemPath>,
origin_path: ResolvedVc<FileSystemPath>,
}

#[turbo_tasks::value_impl]
Expand All @@ -331,7 +332,7 @@ impl Issue for FontResolvingIssue {

#[turbo_tasks::function]
fn file_path(&self) -> Vc<FileSystemPath> {
self.origin_path
*self.origin_path
}

#[turbo_tasks::function]
Expand Down
Loading