Better error messages when the proc-macro-server fails to start

This commit is contained in:
Lukas Wirth
2022-07-23 20:24:01 +02:00
parent aeb07745d5
commit 50b27e57ba
3 changed files with 12 additions and 12 deletions

View File

@@ -60,9 +60,9 @@ pub fn load_workspace(
let proc_macro_client = if load_config.with_proc_macro {
let path = AbsPathBuf::assert(std::env::current_exe()?);
Some(ProcMacroServer::spawn(path, &["proc-macro"]).unwrap())
Ok(ProcMacroServer::spawn(path, &["proc-macro"]).unwrap())
} else {
None
Err("proc macro server not started".to_owned())
};
let crate_graph = ws.to_crate_graph(
@@ -89,7 +89,7 @@ pub fn load_workspace(
if load_config.prefill_caches {
host.analysis().parallel_prime_caches(1, |_| {})?;
}
Ok((host, vfs, proc_macro_client))
Ok((host, vfs, proc_macro_client.ok()))
}
fn load_crate_graph(