Skip to content

Commit 85904e5

Browse files
committed
Implement integration with 'source' commands
1 parent 328aa00 commit 85904e5

File tree

7 files changed

+262
-71
lines changed

7 files changed

+262
-71
lines changed

Cargo.lock

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

compiler-bin/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,18 @@ analyzer = { version = "0.1.0", path = "../compiler-lsp/analyzer" }
1616
async-lsp = "0.2.2"
1717
clap = { version = "4.5.47", features = ["derive"] }
1818
files = { version = "0.1.0", path = "../compiler-core/files" }
19+
globset = "0.4.18"
1920
parking_lot = "0.12.4"
21+
path-absolutize = "3.1.1"
2022
serde = { version = "1.0.219", features = ["derive"] }
2123
spago = { version = "0.1.0", path = "../compiler-lsp/spago" }
24+
thiserror = "2.0.17"
2225
tokio = { version = "1.47.1", features = ["full"] }
2326
tower = "0.5.2"
2427
tracing = "0.1.41"
2528
tracing-subscriber = "0.3.20"
2629
url = "2.5.7"
30+
walkdir = "2.5.0"
2731

2832
[target.'cfg(not(unix))'.dependencies]
2933
tokio-util = { version = "0.7.16", features = ["compat"] }

compiler-bin/src/cli.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,10 @@ pub struct Config {
2424
default_value("info")
2525
)]
2626
pub lsp_log: LevelFilter,
27+
#[arg(
28+
long,
29+
help("Command to use to get source files"),
30+
long_help("This argument also disables the spago.lock integration")
31+
)]
32+
pub source_command: Option<String>,
2733
}

compiler-bin/src/logging.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{env, fs, path::PathBuf, time::Instant};
1+
use std::{env, fs, path::PathBuf, sync::Arc, time::Instant};
22

33
use tracing::level_filters::LevelFilter;
44
use tracing_subscriber::{Layer, Registry, filter, fmt, layer::SubscriberExt};
@@ -34,7 +34,7 @@ pub fn temporary_log_file() -> PathBuf {
3434
temporary_directory.join("purescript-analyzer.log")
3535
}
3636

37-
pub fn start(config: cli::Config) {
37+
pub fn start(config: Arc<cli::Config>) {
3838
let path = temporary_log_file();
3939
let file = fs::OpenOptions::new()
4040
.create(true)

0 commit comments

Comments
 (0)