You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Atom 1.21 added functionality to watch files and folders in specific paths for changes. We should use this to send the appropriate reindex events.
The core currently provides no mechanism to remove files from the index, it automatically prunes the index on every folder index as compensation. This, however, results in weird edge cases where you remove a file from the workspace, but the class inside it remains available for a while (because the core did not pick it up yet).
In a language server scenario, the client has to do all the watching and send the appropriate events to the server anyway, so this is a step in the right direction in any case.
This will also obsolete the need for watching the Git repository for changes, though we'll have to test how this behaves with branch switching via Git.
The text was updated successfully, but these errors were encountered:
I have currently run into the edge case of getClassInfo returning false positives after the containing file was deleted. We certainly need a way of keeping the database in sync with the filesystem.
To be honest though, isn't this something the core should handle?
That is indeed currently a bug as there is no one listening to these removals and the core doesn't pick them up until the next project reindex, which automatically prunes existing files - to mitigate this a bit.
At first I also thought this is something the core should handle, but the language server specification indicates the client should do the watching and send it to the server. This is now possible since a couple of Atom versions ago, hence this ticket. A couple of reasons for doing so are listed there as well.
Another reason would be that the server and client don't necessarily have to share the same filesystem (i.e. in remote scenario's). The LSP doesn't officially mention it but there is an extension about it floating about somewhere.
Atom 1.21 added functionality to watch files and folders in specific paths for changes. We should use this to send the appropriate reindex events.
The core currently provides no mechanism to remove files from the index, it automatically prunes the index on every folder index as compensation. This, however, results in weird edge cases where you remove a file from the workspace, but the class inside it remains available for a while (because the core did not pick it up yet).
In a language server scenario, the client has to do all the watching and send the appropriate events to the server anyway, so this is a step in the right direction in any case.
This will also obsolete the need for watching the Git repository for changes, though we'll have to test how this behaves with branch switching via Git.
The text was updated successfully, but these errors were encountered: