Skip to content

Commit 76ca674

Browse files
committed
chore: add debug logging and local install script
- Add tracing logs for lock file lookup debugging - Create scripts/install-local.sh for Zed dev extension testing
1 parent f3dcf77 commit 76ca674

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

crates/deps-lsp/src/document_lifecycle.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,17 @@ where
7474
let dependencies: Vec<H::Dependency> = parse_result.into_iter().collect();
7575

7676
let unified_deps: Vec<UnifiedDependency> = dependencies.into_iter().map(wrap_dep_fn).collect();
77+
78+
tracing::info!("handle_document_open: starting lock file lookup for {}", uri);
79+
7780
let lockfile_versions = {
7881
let cache = Arc::clone(&state.cache);
7982
let handler = H::new(cache);
8083

8184
if let Some(provider) = handler.lockfile_provider() {
85+
tracing::info!("handle_document_open: got lockfile provider");
8286
if let Some(lockfile_path) = provider.locate_lockfile(&uri) {
87+
tracing::info!("handle_document_open: found lock file at {}", lockfile_path.display());
8388
match state
8489
.lockfile_cache
8590
.get_or_parse(provider.as_ref(), &lockfile_path)
@@ -99,10 +104,11 @@ where
99104
}
100105
}
101106
} else {
102-
tracing::debug!("No lock file found for {}", uri);
107+
tracing::warn!("No lock file found for {}", uri);
103108
None
104109
}
105110
} else {
111+
tracing::warn!("No lockfile provider for this ecosystem");
106112
None
107113
}
108114
};

scripts/install-local.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
# Install deps-lsp to ~/.local/bin for Zed dev extension testing
3+
4+
set -e
5+
6+
cargo build --release -p deps-lsp
7+
cp target/release/deps-lsp ~/.local/bin/
8+
echo "✓ Installed deps-lsp to ~/.local/bin/"
9+
echo " Restart Zed to use the new version"

0 commit comments

Comments
 (0)