internal: Load VFS config changes in parallel

This commit is contained in:
Lukas Wirth 2024-08-02 12:57:15 +02:00
parent 758ad25229
commit 8286847bee
7 changed files with 128 additions and 80 deletions

View file

@ -19,7 +19,11 @@ use project_model::{
CargoConfig, ManifestPath, PackageRoot, ProjectManifest, ProjectWorkspace, ProjectWorkspaceKind,
};
use span::Span;
use vfs::{file_set::FileSetConfig, loader::Handle, AbsPath, AbsPathBuf, VfsPath};
use vfs::{
file_set::FileSetConfig,
loader::{Handle, LoadingProgress},
AbsPath, AbsPathBuf, VfsPath,
};
pub struct LoadCargoConfig {
pub load_out_dirs_from_check: bool,
@ -409,8 +413,8 @@ fn load_crate_graph(
// wait until Vfs has loaded all roots
for task in receiver {
match task {
vfs::loader::Message::Progress { n_done, n_total, .. } => {
if n_done == Some(n_total) {
vfs::loader::Message::Progress { n_done, .. } => {
if n_done == LoadingProgress::Finished {
break;
}
}