diff --git a/crates/rust-analyzer/src/bin/main.rs b/crates/rust-analyzer/src/bin/main.rs index ba4402ade301..97b246a32258 100644 --- a/crates/rust-analyzer/src/bin/main.rs +++ b/crates/rust-analyzer/src/bin/main.rs @@ -134,6 +134,10 @@ fn run_server() -> Result<()> { let discovered = ProjectManifest::discover_all(&workspace_roots); log::info!("discovered projects: {:?}", discovered); + if discovered.is_empty() { + log::error!("failed to find any projects in {:?}", workspace_roots); + } + config.linked_projects = discovered.into_iter().map(LinkedProject::from).collect(); } diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 1a74286f5367..69d05aed5ace 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs @@ -288,7 +288,10 @@ impl Config { let path = self.root_path.join(it); match ProjectManifest::from_manifest_file(path) { Ok(it) => it.into(), - Err(_) => continue, + Err(e) => { + log::error!("failed to load linked project: {}", e); + continue; + } } } ManifestOrProjectJson::ProjectJson(it) => {