Unverified Commit 4268acf1 authored by Sebastian "Sebbie" Silbermann's avatar Sebastian "Sebbie" Silbermann Committed by GitHub

[turbopack] Remove obsolete is_internal field (#90329)

parent cbc4888b
...@@ -2127,7 +2127,6 @@ pub fn project_compilation_events_subscribe( ...@@ -2127,7 +2127,6 @@ pub fn project_compilation_events_subscribe(
)] )]
pub struct StackFrame { pub struct StackFrame {
pub is_server: bool, pub is_server: bool,
pub is_internal: Option<bool>,
pub is_ignored: Option<bool>, pub is_ignored: Option<bool>,
pub original_file: Option<RcStr>, pub original_file: Option<RcStr>,
pub file: RcStr, pub file: RcStr,
...@@ -2258,7 +2257,7 @@ pub async fn project_trace_source_operation( ...@@ -2258,7 +2257,7 @@ pub async fn project_trace_source_operation(
let project_root_uri = let project_root_uri =
uri_from_file(container.project().project_root_path().owned().await?, None).await? + "/"; uri_from_file(container.project().project_root_path().owned().await?, None).await? + "/";
let (file, original_file, is_internal) = let (file, original_file) =
if let Some(source_file) = original_file.strip_prefix(&project_root_uri) { if let Some(source_file) = original_file.strip_prefix(&project_root_uri) {
// Client code uses file:// // Client code uses file://
( (
...@@ -2268,7 +2267,6 @@ pub async fn project_trace_source_operation( ...@@ -2268,7 +2267,6 @@ pub async fn project_trace_source_operation(
.trim_start_matches("./"), .trim_start_matches("./"),
), ),
Some(RcStr::from(source_file)), Some(RcStr::from(source_file)),
false,
) )
} else if let Some(source_file) = original_file.strip_prefix(&*SOURCE_MAP_PREFIX_PROJECT) { } else if let Some(source_file) = original_file.strip_prefix(&*SOURCE_MAP_PREFIX_PROJECT) {
// Server code uses turbopack:///[project] // Server code uses turbopack:///[project]
...@@ -2283,12 +2281,10 @@ pub async fn project_trace_source_operation( ...@@ -2283,12 +2281,10 @@ pub async fn project_trace_source_operation(
.trim_start_matches("./"), .trim_start_matches("./"),
), ),
Some(RcStr::from(source_file)), Some(RcStr::from(source_file)),
false,
) )
} else if let Some(source_file) = original_file.strip_prefix(&*SOURCE_MAP_PREFIX) { } else if let Some(source_file) = original_file.strip_prefix(&*SOURCE_MAP_PREFIX) {
// All other code like turbopack:///[turbopack] is internal code
// TODO(veil): Should the protocol be preserved? // TODO(veil): Should the protocol be preserved?
(RcStr::from(source_file), None, true) (RcStr::from(source_file), None)
} else { } else {
bail!( bail!(
"Original file ({}) outside project ({})", "Original file ({}) outside project ({})",
...@@ -2304,7 +2300,6 @@ pub async fn project_trace_source_operation( ...@@ -2304,7 +2300,6 @@ pub async fn project_trace_source_operation(
line, line,
column, column,
is_server: frame.is_server, is_server: frame.is_server,
is_internal: Some(is_internal),
is_ignored: Some(is_ignored), is_ignored: Some(is_ignored),
}))) })))
} }
......
...@@ -362,7 +362,6 @@ export declare function projectCompilationEventsSubscribe( ...@@ -362,7 +362,6 @@ export declare function projectCompilationEventsSubscribe(
): void ): void
export interface StackFrame { export interface StackFrame {
isServer: boolean isServer: boolean
isInternal?: boolean
isIgnored?: boolean isIgnored?: boolean
originalFile?: RcStr originalFile?: RcStr
file: RcStr file: RcStr
......
...@@ -229,7 +229,6 @@ export interface HmrChunkNames { ...@@ -229,7 +229,6 @@ export interface HmrChunkNames {
/** @see https://github.com/vercel/next.js/blob/415cd74b9a220b6f50da64da68c13043e9b02995/crates/next-napi-bindings/src/next_api/project.rs#L824-L833 */ /** @see https://github.com/vercel/next.js/blob/415cd74b9a220b6f50da64da68c13043e9b02995/crates/next-napi-bindings/src/next_api/project.rs#L824-L833 */
export interface TurbopackStackFrame { export interface TurbopackStackFrame {
isServer: boolean isServer: boolean
isInternal?: boolean
isIgnored?: boolean isIgnored?: boolean
file: string file: string
originalFile?: string originalFile?: string
......
...@@ -89,9 +89,7 @@ async function batchedTraceSource( ...@@ -89,9 +89,7 @@ async function batchedTraceSource(
const ignored = const ignored =
// Check the sourcemap's ignoreList (e.g. from 3rd party packages) // Check the sourcemap's ignoreList (e.g. from 3rd party packages)
!!sourceFrame.isIgnored || !!sourceFrame.isIgnored ||
shouldIgnorePath(originalFile ?? sourceFrame.file) || shouldIgnorePath(originalFile ?? sourceFrame.file)
// isInternal means resource starts with turbopack:///[turbopack]
!!sourceFrame.isInternal
if (originalFile && !ignored) { if (originalFile && !ignored) {
let sourcePromise = currentSourcesByFile.get(originalFile) let sourcePromise = currentSourcesByFile.get(originalFile)
if (!sourcePromise) { if (!sourcePromise) {
......
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