mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
chore: add some tracing
to project loading
This commit is contained in:
parent
af1fd88c4d
commit
2a030ba755
7 changed files with 33 additions and 5 deletions
|
@ -17,6 +17,7 @@ use itertools::Itertools;
|
|||
use proc_macro_api::{MacroDylib, ProcMacroServer};
|
||||
use project_model::{CargoConfig, PackageRoot, ProjectManifest, ProjectWorkspace};
|
||||
use span::Span;
|
||||
use tracing::{instrument, Level};
|
||||
use vfs::{file_set::FileSetConfig, loader::Handle, AbsPath, AbsPathBuf, VfsPath};
|
||||
|
||||
pub struct LoadCargoConfig {
|
||||
|
@ -50,6 +51,7 @@ pub fn load_workspace_at(
|
|||
load_workspace(workspace, &cargo_config.extra_env, load_config)
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
pub fn load_workspace(
|
||||
ws: ProjectWorkspace,
|
||||
extra_env: &FxHashMap<String, String>,
|
||||
|
@ -352,6 +354,7 @@ fn load_crate_graph(
|
|||
}
|
||||
}
|
||||
vfs::loader::Message::Loaded { files } | vfs::loader::Message::Changed { files } => {
|
||||
let _p = tracing::span!(Level::INFO, "LoadCargo::load_file_contents").entered();
|
||||
for (path, contents) in files {
|
||||
vfs.set_file_contents(path.into(), contents);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue