Skip to content
Open
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
9 changes: 9 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "BAML: Debug smoke main()",
"type": "baml",
"request": "launch",
"projectPath": "${workspaceFolder}/debugger_smoke",
"functionName": "main",
"args": {},
"stopOnEntry": false
},
{
"name": "Launch VS Code extension (v2)",
"type": "extensionHost",
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"[baml]": {
"editor.defaultFormatter": "Boundary.baml-extension"
},
"baml.cliPath": "/media/tony/WesternDigitalNvmeSsd/Code/baml/baml_language/target/debug/baml-cli",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Remove this developer-local path — contradicts PR intent and pollutes shared workspace settings.

The PR objectives explicitly state "Local .vscode/settings.json (baml.cliPath) intentionally omitted from the PR", yet this line was committed. The path /media/tony/WesternDigitalNvmeSsd/Code/baml/baml_language/target/debug/baml-cli is:

  1. Machine-specific: will be missing on every other contributor's machine, likely causing the extension to emit an error or degrade silently.
  2. Information leak: exposes the developer's username, drive label, and internal directory layout.

The fix is to revert this line. If the intent is to document the setting for contributors, add a comment in README or .vscode/extensions.json; if it needs to be tracked locally, add .vscode/settings.json (or a *.local.json variant) to .gitignore.

🗑️ Proposed fix
-  "baml.cliPath": "/media/tony/WesternDigitalNvmeSsd/Code/baml/baml_language/target/debug/baml-cli",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"baml.cliPath": "/media/tony/WesternDigitalNvmeSsd/Code/baml/baml_language/target/debug/baml-cli",

"[typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features",
"editor.insertSpaces": true,
Expand Down
7 changes: 7 additions & 0 deletions baml_language/Cargo.lock

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

8 changes: 7 additions & 1 deletion baml_language/crates/baml_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,17 @@ workspace = true
[dependencies]
baml_fmt = { workspace = true }
baml_lsp_server = { workspace = true }
baml_project = { workspace = true }
bex_vm = { workspace = true }
bex_vm_types = { workspace = true }
anyhow = { workspace = true }
clap = { workspace = true, features = [ "color", "env" ] }
clap-cargo = { workspace = true }
ctrlc = { workspace = true }
indexmap = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
walkdir = { workspace = true }

[features]
default = [ "native-tls" ]
Expand All @@ -49,4 +56,3 @@ path = "src/main.rs"

[package.metadata.ci]
wasm_support = false

16 changes: 16 additions & 0 deletions baml_language/crates/baml_cli/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ pub(crate) enum Commands {
// DumpBytecode(baml_runtime::cli::dump_intermediate::DumpIntermediateArgs),
#[command(about = "Starts a language server", name = "lsp")]
LanguageServer(crate::lsp::LanguageServerArgs),
#[command(
about = "Starts the BAML Debug Adapter Protocol server",
name = "dap",
hide = true
)]
DebugAdapter(crate::dap::DebugAdapterArgs),
// #[command(about = "Start an interactive REPL for BAML expressions", hide = true)]
// Repl(baml_runtime::cli::repl::ReplArgs),

Expand Down Expand Up @@ -118,6 +124,16 @@ impl RuntimeCli {
Ok(crate::ExitCode::Other)
}
},
Commands::DebugAdapter(args) => match args.run() {
Ok(()) => Ok(crate::ExitCode::Success),
Err(e) => {
#[allow(clippy::print_stderr)]
{
eprintln!("Error: {e}");
}
Ok(crate::ExitCode::Other)
}
},
Commands::Format(args) => args.run(),
}
}
Expand Down
Loading
Loading