Skip to content
Merged
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
211 changes: 194 additions & 17 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ clap = { version = "4", default-features = false, features = [
"usage",
"error-context",
] }
rusqlite = { version = "0.31", features = ["bundled"] }
postcard = { version = "1.1", default-features = false, features = ["use-std"] }
blake3 = "=1.5.5"

# benches
criterion = "0.8"
3 changes: 3 additions & 0 deletions crates/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ tracing-subscriber.workspace = true
anyhow.workspace = true
walkdir.workspace = true
clap.workspace = true
rusqlite.workspace = true
postcard.workspace = true
blake3.workspace = true
26 changes: 2 additions & 24 deletions crates/server/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1391,19 +1391,7 @@ impl Backend {
}

pub async fn index_cache_path(&self) -> Result<String> {
let roots = self
.roots
.lock()
.map(|roots| roots.clone())
.unwrap_or_default();
let base_roots = self
.settings
.lock()
.map(|settings| settings.base_ini_roots.clone())
.unwrap_or_default();
Ok(index_cache_path(&roots, &base_roots)
.to_string_lossy()
.into_owned())
Ok(index_cache_path().to_string_lossy().into_owned())
}

/// The (kind, name, span) under the cursor — a reference-typed value token
Expand Down Expand Up @@ -1704,16 +1692,6 @@ impl LanguageServer for Backend {
{
return Ok(None);
}
let roots = self
.roots
.lock()
.map(|roots| roots.clone())
.unwrap_or_default();
let base_roots = self
.settings
.lock()
.map(|settings| settings.base_ini_roots.clone())
.unwrap_or_default();
let mut progress = if params.command == REBUILD_INDEX_CACHE_COMMAND {
Some(self.begin_progress(ProgressWork::ManualRebuild).await)
} else {
Expand All @@ -1724,7 +1702,7 @@ impl LanguageServer for Backend {
.report("Clearing the persistent index cache", Some(0))
.await;
}
let cleared = match clear_index_cache(&roots, &base_roots) {
let cleared = match clear_index_cache() {
Ok(cleared) => cleared,
Err(error) => {
tracing::error!(%error, "asset index cache clear failed");
Expand Down
Loading