diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-09-17 16:37:37 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-09-17 16:37:37 +0100 |
commit | 086f1c4b3025b405fde077df3319551140136131 (patch) | |
tree | 43faa696a399d224fb2975cc4df65e5dfc7d87f9 | |
parent | 7af7e1f25322b723fbaf0b2477b2b0716905f619 (diff) | |
parent | d328ee647f551e8616e7716b574343fab8f9e8d2 (diff) |
Merge #6025
6025: Use `log::error!` in a few more places r=jonas-schievink a=jonas-schievink
Co-authored-by: Jonas Schievink <[email protected]>
-rw-r--r-- | crates/rust-analyzer/src/bin/main.rs | 4 | ||||
-rw-r--r-- | crates/rust-analyzer/src/config.rs | 5 |
2 files changed, 8 insertions, 1 deletions
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<()> { | |||
134 | 134 | ||
135 | let discovered = ProjectManifest::discover_all(&workspace_roots); | 135 | let discovered = ProjectManifest::discover_all(&workspace_roots); |
136 | log::info!("discovered projects: {:?}", discovered); | 136 | log::info!("discovered projects: {:?}", discovered); |
137 | if discovered.is_empty() { | ||
138 | log::error!("failed to find any projects in {:?}", workspace_roots); | ||
139 | } | ||
140 | |||
137 | config.linked_projects = discovered.into_iter().map(LinkedProject::from).collect(); | 141 | config.linked_projects = discovered.into_iter().map(LinkedProject::from).collect(); |
138 | } | 142 | } |
139 | 143 | ||
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 { | |||
288 | let path = self.root_path.join(it); | 288 | let path = self.root_path.join(it); |
289 | match ProjectManifest::from_manifest_file(path) { | 289 | match ProjectManifest::from_manifest_file(path) { |
290 | Ok(it) => it.into(), | 290 | Ok(it) => it.into(), |
291 | Err(_) => continue, | 291 | Err(e) => { |
292 | log::error!("failed to load linked project: {}", e); | ||
293 | continue; | ||
294 | } | ||
292 | } | 295 | } |
293 | } | 296 | } |
294 | ManifestOrProjectJson::ProjectJson(it) => { | 297 | ManifestOrProjectJson::ProjectJson(it) => { |