Get rid of all transport types and settle on Protobuf (#25)

* Get rid of all transport types and settle on Protobuf

hope i don't regret this

* Update Cargo.toml

* Update agent.py
This commit is contained in:
Josh Thomas 2024-12-12 16:53:49 -06:00 committed by GitHub
parent 643a47953e
commit 0a6e975ca5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 1484 additions and 685 deletions

View file

@ -1,5 +1,7 @@
use clap::{Args, Parser, Subcommand};
use djls_ipc::{PythonProcess, Transport};
use djls_ipc::v1::*;
use djls_ipc::{ProcessError, PythonProcess, TransportError};
use std::ffi::OsStr;
use std::time::Duration;
#[derive(Debug, Parser)]
@ -41,8 +43,13 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
match cli.command {
Commands::Serve(opts) => {
let python =
PythonProcess::new("djls.lsp", Transport::Json, opts.health_check_interval())?;
println!("Starting LSP server...");
let python = PythonProcess::new::<Vec<&OsStr>, &OsStr>(
"djls.agent",
None,
opts.health_check_interval(),
)?;
println!("LSP server started, beginning to serve...");
djls_server::serve(python).await?
}
}