Skip to content

Commit 086f1c4

Browse files
bors[bot]Jonas Schievink
andauthored
Merge #6025
6025: Use `log::error!` in a few more places r=jonas-schievink a=jonas-schievink Co-authored-by: Jonas Schievink <[email protected]>
2 parents 7af7e1f + d328ee6 commit 086f1c4

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

crates/rust-analyzer/src/bin/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ fn run_server() -> Result<()> {
134134

135135
let discovered = ProjectManifest::discover_all(&workspace_roots);
136136
log::info!("discovered projects: {:?}", discovered);
137+
if discovered.is_empty() {
138+
log::error!("failed to find any projects in {:?}", workspace_roots);
139+
}
140+
137141
config.linked_projects = discovered.into_iter().map(LinkedProject::from).collect();
138142
}
139143

crates/rust-analyzer/src/config.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,10 @@ impl Config {
288288
let path = self.root_path.join(it);
289289
match ProjectManifest::from_manifest_file(path) {
290290
Ok(it) => it.into(),
291-
Err(_) => continue,
291+
Err(e) => {
292+
log::error!("failed to load linked project: {}", e);
293+
continue;
294+
}
292295
}
293296
}
294297
ManifestOrProjectJson::ProjectJson(it) => {

0 commit comments

Comments
 (0)