Skip to content

Commit 2e1012a

Browse files
committed
debug
1 parent bfb78ae commit 2e1012a

5 files changed

Lines changed: 7 additions & 6 deletions

File tree

packages/cli/binding/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ export interface JsCommandResolvedResult {
6363
* Errors from JavaScript resolvers are converted to specific error types
6464
* (e.g., `LintFailed`, `ViteError`) to provide better error messages.
6565
*/
66-
export declare function run(options: CliOptions): Promise<number>
66+
export declare function run(options: CliOptions): Promise<void>

packages/cli/binding/src/cli.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,9 +668,9 @@ pub async fn main<
668668
oxlint_config_path.as_path().to_string_lossy().into_owned(),
669669
]);
670670
}
671-
eprintln!("Before lint");
671+
eprintln!("Before lint {}", std::process::id());
672672
let summary = lint(lint_fn, &workspace, args).await?;
673-
eprintln!("After lint: {:?}", summary);
673+
eprintln!("After lint: {} {:?}", std::process::id(), summary);
674674
workspace.unload().await?;
675675
summary
676676
}

packages/cli/binding/src/commands/lint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ pub async fn lint<
2727
ResolvedTask::resolve_from_builtin(workspace, wrapped_command, "lint", args.iter()).await?;
2828
let mut task_graph: StableGraph<ResolvedTask, ()> = Default::default();
2929
task_graph.add_node(resolved_task);
30-
dbg!(ExecutionPlan::plan(task_graph, false)?.execute(workspace).await)
30+
dbg!((std::process::id(), ExecutionPlan::plan(task_graph, false)?.execute(workspace).await)).1
3131
}

packages/cli/binding/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ mod commands;
1919
use std::{collections::HashMap, sync::Arc};
2020

2121
use clap::Parser as _;
22-
use napi::{anyhow, bindgen_prelude::*, threadsafe_function::ThreadsafeFunction};
22+
use napi::{bindgen_prelude::*, threadsafe_function::ThreadsafeFunction};
2323
use napi_derive::napi;
2424
use vite_error::Error;
2525
use vite_path::current_dir;
@@ -202,6 +202,7 @@ pub async fn run(options: CliOptions) {
202202
)
203203
.await;
204204

205+
eprintln!("result {} {:?}", std::process::id(), result);
205206
tracing::debug!("Result: {result:?}");
206207

207208
let exit_code = match result {

packages/cli/src/bin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ async function resolveUniversalViteConfig(err: null | Error, viteConfigCwd: stri
3232

3333
// Initialize the CLI with tool resolvers
3434
// These functions will be called from Rust when needed
35-
run({
35+
await run({
3636
lint, // Resolves oxlint binary for linting
3737
lib, // Resolves tsdown binary for lib bundling
3838
fmt, // Resolves oxfmt binary for formatting

0 commit comments

Comments
 (0)