Skip to content

Commit

Permalink
Remove inProcess option as it's not used
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens committed May 6, 2024
1 parent 48dc4d6 commit ab36b11
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 20 deletions.
16 changes: 3 additions & 13 deletions packages/next-swc/crates/napi/src/turbo_trace_server.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
use std::{path::PathBuf, thread};

use napi::JsBoolean;
use std::path::PathBuf;

#[napi]
pub fn start_turbopack_trace_server(path: String, in_process: JsBoolean) -> napi::Result<String> {
pub fn start_turbopack_trace_server(path: String) {
let path_buf = PathBuf::from(path);
if in_process.get_value()? {
turbopack_binding::turbopack::trace_server::start_turbopack_trace_server(path_buf);
} else {
thread::spawn(move || {
turbopack_binding::turbopack::trace_server::start_turbopack_trace_server(path_buf);
});
}

Ok("".to_string())
turbopack_binding::turbopack::trace_server::start_turbopack_trace_server(path_buf);
}
9 changes: 3 additions & 6 deletions packages/next/src/build/swc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export interface Binding {
options: ProjectOptions,
turboEngineOptions?: TurboEngineOptions
) => Promise<Project>
startTurbopackTraceServer: (path: string, inProcess: boolean) => void
startTurbopackTraceServer: (path: string) => void
}
mdx: {
compile: any
Expand Down Expand Up @@ -1483,14 +1483,11 @@ function loadNative(importPath?: string) {
},
},
createProject: bindingToApi(customBindings ?? bindings, false),
startTurbopackTraceServer: (traceFilePath, inProcess) => {
startTurbopackTraceServer: (traceFilePath) => {
Log.warn(
'Turbopack trace server started. View trace at https://turbo-trace-viewer.vercel.app/'
)
;(customBindings ?? bindings).startTurbopackTraceServer(
traceFilePath,
inProcess
)
;(customBindings ?? bindings).startTurbopackTraceServer(traceFilePath)
},
},
mdx: {
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/cli/internal/turbo-trace-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { loadBindings } from '../../build/swc'

export async function startTurboTraceServerCli(file: string) {
let bindings = await loadBindings()
bindings.turbo.startTurbopackTraceServer(file, true)
bindings.turbo.startTurbopackTraceServer(file)
}

0 comments on commit ab36b11

Please sign in to comment.