Skip to content

Extend VFS to watch files #433

Closed
Closed
@matklad

Description

@matklad

Currently, VFS reads files once at startup, and then only uses text-editor notifications to change the state of files.

This works surprisingly well in practice, but we do miss some file system changes (when, for example, switching branches in git). We should add file-system watching to vfs.

This is tricky in itself, and it is not made easier by the fact that the main filesystem-watching library, https://github.com/passcod/notify/, is transitioning from v4 (which is frozen) to v5 (which is not released yet). v5 does not seem like it would be done in the nearish term, so we should perhaps rely on v4 for the time being.

The code for vfs is here:

https://github.com/rust-analyzer/rust-analyzer/blob/53ffa2a030be52ad6ddcf3c038f08c337894fbe7/crates/ra_vfs/src/lib.rs

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-hardfunA technically challenging issue with high impact

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions