Skip to content

Commit 09aeb12

Browse files
authored
fix: get jetbrains working (#2358)
- jetbrains works this time, hopefully for real - at least hopefully it will when the new CLI is pushed - playground opens on startup - we also now have mechanisms to hot reload the lsp there, and a small barebones repro for the playground server - the UI can still be really slow, but it's a step function improvement over before - add deadlock detection logging to the language server (maybe we should crash on deadlock?) - rewrite the playground server using axum, no reason to use warp when we use axum everywhere else
1 parent 0717269 commit 09aeb12

73 files changed

Lines changed: 3149 additions & 3220 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

engine/Cargo.lock

Lines changed: 733 additions & 418 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

engine/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ members = [
1111
"baml-vm",
1212
"bstd",
1313
"cli",
14+
"tools",
1415
"language_client_codegen",
1516
"language_client_python",
1617
"language_client_ruby/ext/ruby_ffi",
@@ -23,6 +24,7 @@ members = [
2324
"sandbox",
2425
"llm-response-parser",
2526
"boundary-udf",
27+
"playground-server",
2628
]
2729
default-members = [
2830
"baml-compiler",
@@ -89,6 +91,7 @@ indoc = "2.0.5"
8991
internal-baml-codegen = { path = "language_client_codegen" }
9092
internal-baml-core = { path = "baml-lib/baml-core" }
9193
internal-baml-jinja = { path = "baml-lib/jinja-runtime" }
94+
playground-server = { path = "playground-server" }
9295
internal-llm-client = { path = "baml-lib/llm-client" }
9396
itertools = "0.14.0"
9497
jsonish = { path = "baml-lib/jsonish" }
@@ -151,7 +154,9 @@ thiserror = "2.0.12"
151154
tower = "0.5"
152155
tower-http = { version = "0.6", features = ["cors", "trace"] }
153156
time = { version = "0.3.36", features = ["formatting"] }
157+
tracing = "0.1"
154158
tracing-core = { version = "0.1.31" }
159+
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
155160
pin-project-lite = "0.2.14"
156161
url = "2.5.2"
157162
uuid = { version = "1.8.0", features = ["v4", "v7", "serde"] }

engine/cli/src/lsp.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,7 @@ use clap::Args;
33
use language_server::run_server;
44

55
#[derive(Args, Debug)]
6-
pub struct LanguageServerArgs {
7-
#[arg(
8-
long,
9-
help = "port to expose language server on",
10-
default_value = "2025"
11-
)]
12-
port: u16,
13-
}
6+
pub struct LanguageServerArgs {}
147

158
impl LanguageServerArgs {
169
pub fn run(&self) -> Result<()> {

engine/language_client_go/pkg/cffi/cffi.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

engine/language_server/Cargo.toml

Lines changed: 14 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,14 @@ internal-baml-diagnostics = { path = "../baml-lib/diagnostics" }
2525
internal-baml-codegen = { workspace = true }
2626
crossbeam = { version = "0.8.4", features = ["crossbeam-channel"] }
2727
ignore = { version = "0.4.22" }
28+
parking_lot = { version = "0.12", features = ["deadlock_detection"] }
2829
indexmap = { workspace = true }
2930
jod-thread = { version = "0.1.2" }
3031
lsp-server = "0.7.6"
3132
lsp-types = "0.95.0"
33+
playground-server.workspace = true
3234
regex = { version = "1.10.2" }
35+
reqwest.workspace = true
3336
rustc-hash = { version = "2.0.0" }
3437
serde = { version = "1.0.197", features = ["derive"] }
3538
serde_json = { version = "1.0.113" }
@@ -71,21 +74,16 @@ simple-logging = "2.0.2"
7174
itertools = "0.14.0"
7275
url.workspace = true
7376

74-
tokio = { version = "1.36", features = ["full"] }
75-
76-
# Playground server dependencies
77-
warp = { version = "0.3", optional = true }
78-
futures-util = { version = "0.3", optional = true }
79-
include_dir = { version = "0.7", optional = true }
80-
mime_guess = { version = "2.0.4", optional = true }
81-
webbrowser = { version = "0.8", optional = true }
82-
reqwest = { version = "0.12", features = ["blocking", "json"], optional = true }
83-
tar = { version = "0.4", optional = true }
84-
flate2 = { version = "1.0", optional = true }
85-
dirs = { version = "5.0", optional = true }
86-
sha2 = { version = "0.10", optional = true }
87-
base64 = { version = "0.21", optional = true }
88-
bytes = { version = "1.0", optional = true }
77+
tokio = { version = "1.36", features = ["full", "tracing"] }
78+
79+
console-subscriber = { version = "0.4.1", features = ["grpc-web"] }
80+
axum = { version = "0.8.4", features = ["ws"] }
81+
futures.workspace = true
82+
tokio-stream = "0.1.17"
83+
tower-http = { version = "0.6.6", features = ["fs", "cors"] }
84+
tower = "0.5"
85+
webbrowser = "1.0.5"
86+
mime_guess = "2.0.5"
8987

9088
[dev-dependencies]
9189
insta = { version = "1.42.1" }
@@ -97,19 +95,4 @@ libc = { version = "0.2.169" }
9795
# workspace = true
9896

9997
[features]
100-
# Enables the playground server functionality and its dependencies
101-
default = ["playground-server"]
102-
playground-server = [
103-
"warp",
104-
"futures-util",
105-
"include_dir",
106-
"mime_guess",
107-
"webbrowser",
108-
"reqwest",
109-
"tar",
110-
"flate2",
111-
"dirs",
112-
"sha2",
113-
"base64",
114-
"bytes",
115-
]
98+
default = []

0 commit comments

Comments
 (0)