From d328ee647f551e8616e7716b574343fab8f9e8d2 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Thu, 17 Sep 2020 17:37:52 +0200 Subject: Use `log::error!` in a few more places --- crates/rust-analyzer/src/bin/main.rs | 4 ++++ crates/rust-analyzer/src/config.rs | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'crates') diff --git a/crates/rust-analyzer/src/bin/main.rs b/crates/rust-analyzer/src/bin/main.rs index ba4402ade..97b246a32 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 1a74286f5..69d05aed5 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) => { -- cgit v1.2.3