mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Refactor RefPathIndex initialization and attribute indexing
- Removed the `populate_initial_ref_path_index` method from `ChangeProcessor` and integrated its functionality into the `RefPathIndex` struct with a new `populate_from_dir` method. - Updated the `ServeSession` to initialize `RefPathIndex` by populating it directly from the project root directory, ensuring pre-existing `Rojo_Ref_*` attributes are indexed correctly. - This refactor enhances code organization and improves the efficiency of attribute indexing during session initialization.
This commit is contained in:
parent
201b971101
commit
c5a5e973ca
3 changed files with 61 additions and 61 deletions
|
|
@ -174,7 +174,11 @@ impl ServeSession {
|
|||
|
||||
let (tree_mutation_sender, tree_mutation_receiver) = crossbeam_channel::unbounded();
|
||||
let suppressed_paths = Arc::new(Mutex::new(std::collections::HashMap::new()));
|
||||
let ref_path_index = Arc::new(Mutex::new(crate::RefPathIndex::new()));
|
||||
let ref_path_index = {
|
||||
let mut index = crate::RefPathIndex::new();
|
||||
index.populate_from_dir(root_project.folder_location());
|
||||
Arc::new(Mutex::new(index))
|
||||
};
|
||||
|
||||
let git_repo_root = crate::git::git_repo_root(root_project.folder_location());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue