mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-01 04:18:20 +00:00
Merge pull request #19311 from aibaars/log-build-script-error
Log build script error output in `load_cargo::load_workspace_at`
This commit is contained in:
commit
430d7c6b0d
1 changed files with 8 additions and 0 deletions
|
|
@ -45,10 +45,18 @@ pub fn load_workspace_at(
|
||||||
) -> anyhow::Result<(RootDatabase, vfs::Vfs, Option<ProcMacroClient>)> {
|
) -> anyhow::Result<(RootDatabase, vfs::Vfs, Option<ProcMacroClient>)> {
|
||||||
let root = AbsPathBuf::assert_utf8(std::env::current_dir()?.join(root));
|
let root = AbsPathBuf::assert_utf8(std::env::current_dir()?.join(root));
|
||||||
let root = ProjectManifest::discover_single(&root)?;
|
let root = ProjectManifest::discover_single(&root)?;
|
||||||
|
let manifest_path = root.manifest_path().clone();
|
||||||
let mut workspace = ProjectWorkspace::load(root, cargo_config, progress)?;
|
let mut workspace = ProjectWorkspace::load(root, cargo_config, progress)?;
|
||||||
|
|
||||||
if load_config.load_out_dirs_from_check {
|
if load_config.load_out_dirs_from_check {
|
||||||
let build_scripts = workspace.run_build_scripts(cargo_config, progress)?;
|
let build_scripts = workspace.run_build_scripts(cargo_config, progress)?;
|
||||||
|
if let Some(error) = build_scripts.error() {
|
||||||
|
tracing::debug!(
|
||||||
|
"Errors occurred while running build scripts for {}: {}",
|
||||||
|
manifest_path,
|
||||||
|
error
|
||||||
|
);
|
||||||
|
}
|
||||||
workspace.set_build_scripts(build_scripts)
|
workspace.set_build_scripts(build_scripts)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue