-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
Errors during renaming #2518
Comments
I haven't looked closely yet - I am also familiar with this or a similar error, but I get it only between subsequent renaming actions. In most of my cases reindexing allows me to rename file again without error. |
yes probably an issue with stale index, which should be a hot topic as it's something I run into multiple times a day (although in a different context) :) i'll try and investigate. |
@dantleech is it possible that the index will then become stale due to lack of notification from the client for both the old and new (renamed) files? |
yes that is possible. Phpactor will use a number of strategies to detect file changes, CoC will actually send the notifications to Phpactor via. LSP notifications, neovim lsp does not, if that's not possible it will try inotify-watch and watchman, falling back to But probably we can reacticely remove non-existing files from the index when such errors occur. |
I still haven't answered myself which LSP notification about deleted file should be enough to detect the deletion on Phpactor side (or how to verify if any watcher implementation reported such event). |
neovim/neovim#24975 - on the Neovim side we probably also have some missing notification to send after renaming. |
Hopefully fixed in #2559 re-open if not. |
* GH-2518: Do not crash if reference does not exist * Fix div be zero
So far it works perfectly. I took a huge codebase and renamed as much as i could find in as little time as possible. No errors, it worked perfect so far :) Big thanks for tracking this down! |
Damn, i was to fast. I managed to trigger an error during renaming again. I used an Enum with 30+ cases in it and renamed them, the first 20 or so worked fine, but then i got an error:
I am on f4a79b0. I do not have permissions to reopen the issue. |
I mean it is a different error... |
it was trying to show an error, but the error handling was broken - I've updated master and it should at least show the error in the IDE now. |
By coincidence, I encountered the same place in #2531 |
I managed to get the full error message:
I also tried to run phpactor with xdebug attached to it so i could give you better debugging information. But the problem is that for me xdebug does not trigger on PHP AMP forced processed. For some reason its only active on the main thread and then gets disabled. And i cannot enable it globally, because then i get a lot of errors from the code i am working in not beeing found. |
Searching by the message string takes me here:
|
@leo-unglaub please check it again after merging #2627. Did this class member (or reference to it) have any attribute? |
I am not sure what project this was in, but i did a lot of renaming with #2627 and did not see this error. So maybe/hopefully your patch fixed this :) I will keep an eye on it and report back. Thanks so much :) |
Feedback also very appreciated, thank you too. |
Hey,
since a few days i get a lot of errors while renaming some classes. I am on the latest version from git (HEAD) and i am using VS Code as an editor.
Here is the full stacktrace. I also tried deleting everything in
~/.cache/phpactor
and reindexing the project, still the same error.Greetings
Leo
The text was updated successfully, but these errors were encountered: