Extend VFS to allow dynamic addition of source roots #293
Labels
E-hard
E-has-instructions
Issue has some instructions and pointers to code to get started
fun
A technically challenging issue with high impact
Currently,
VFS
requires the set of roots in itsnew
. Ideally, we should allow to dynamically add source roots.This is tricky, however: an added root can be withing some previously existing root, so we'll need to move files from the old root to the new one. (so, both Remove & Add files in the pending_changes).
Another thing to keep in mind is that we can add a new, nested root when the old root is being scanned! So, we need to account for that as well.
The relevant code is here: https://github.com/rust-analyzer/rust-analyzer/blob/1491fafddbe16bb5851c7ad8f82011e224e469ed/crates/ra_vfs/src/lib.rs#L119
The text was updated successfully, but these errors were encountered: