-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
renaming of files and packages causes symbols to get out of sync #1231
Comments
It looks like some file watch events are coming through with a duplicated After debugging through this, Alex filed microsoft/vscode#210517, but it seems like another extension is responsible for this: the |
@martinlippert this sounds like an issue with creating a file system watcher with a path that has a trailing slash or backslash. That should be avoided: I am thinking to make a change in VS Code to address this, but it would still be good to fix the extension as well. |
Okay, once I disable the
It looks like in the case of renaming a package, the language server doesn't receive any events for the files inside of the renamed packages, even though the Java tooling changes the content of those files nicely (switching the package statement to match the renamed folder structure). |
@bpasero Thanks a lot for looking into this and for the pointer to the doc about the trailing slash. Will let the maintainers of the |
More precise analysis of the renaming of packages use case:
This seems to make sense since the files are technically not deleted and not created on disc, if you rename a parent folder. The java language tooling opens those docs in editors and updates the package statement (seems fine, too) and when saving the files, their content is stored to disc with the corresponding doc and file events. But it looks like the language server doesn't get any information about the fact that - in the end - the uri of those docs changed. |
…n if there are no events for contained files being send immediately
…erent file watcher implementations
Fixed with 96ce861. |
The symbol index gets out of sync when (all tested in VSCode):
Need to double check whether this happens in Eclipse as well, probably depending on the events about file changes that we receive.
The text was updated successfully, but these errors were encountered: