tenkawa-php-language-server icon indicating copy to clipboard operation
tenkawa-php-language-server copied to clipboard

Go to definition it doesn't update metadata

Open lgraziani2712 opened this issue 4 years ago • 5 comments

I changed the name of a file and then renamed to the original name again, and this happens:

image

The old file still appears as a candidate to go to.

Versions

  • OS: Windows 10.
  • PHP Version: 7.3.7.
  • VSCode: 1.38.1.
  • Tenkawa plugin: 0.4.4.

lgraziani2712 avatar Sep 16 '19 15:09 lgraziani2712

  1. Did you have the renamed file open (in another tab) when doing "go to"?
  2. How much time passed between the rename and go to? 1-2 minutes or more?

tsufeki avatar Sep 16 '19 18:09 tsufeki

  1. Did you have the renamed file open (in another tab) when doing "go to"?
    • No.
  2. How much time passed between the rename and go to? 1-2 minutes or more?
    • More than 2 minutes, yes. Though it also happened before than 2 minutes too.

BTW, I'm also seeing this problem:

  • File X has a class.
  • File Y has a class and an attribute that uses the class from file X.

If I open the file Y only, I got warnings about undefined methods from the class X. But if I open both of them, I got none.

image

The code I'm working with is for my classroom, so I could be able to push it to a repo, if you need some repro code!

Thanks!

lgraziani2712 avatar Sep 16 '19 23:09 lgraziani2712

How much time passed between the rename and go to? 1-2 minutes or more?

The bug in my first message still happens, and it has been more then 8hs, btw.

lgraziani2712 avatar Sep 16 '19 23:09 lgraziani2712

Ok. I tried deleting and installing the plugin again and didn't fix anything. Then I tried something wild as to rename the root folder. It fixed all the bugs.

Perhaps is something related to the plugin or vscode not cleaning some cache?

lgraziani2712 avatar Sep 16 '19 23:09 lgraziani2712

BTW, if I rename the root folder back to its original name, the bugs still happen.

lgraziani2712 avatar Sep 16 '19 23:09 lgraziani2712