CoffeeChaton / vscode-autohotkey-NekoHelp-Old

my style
Other
9 stars 0 forks source link

Bug: used/unused functions cache problem #18

Closed marius-sucan closed 1 year ago

marius-sucan commented 1 year ago

Hello!

I am getting always the cached report when I do detect unused functions. Class Class_Report_fn_ref.

How do I trigger/remove the cache? Thank you for the great work.

Best regards, Marius.

CoffeeChaton commented 1 year ago

img

use the cmd del cached and rescan workspace.

but I don't why it will get the cached ... when I provide Document Semantic and Symbol , I am update the cache of each file. Can you provide more information ?

marius-sucan commented 1 year ago

I finally got it to refresh. I had to restart it and use the option you suggested.

I don't know why it gets cached. Another detail is that "never used" section was empty when it happened and all other functions are listed as "used only once" .

Best regards, Marius.

CoffeeChaton commented 1 year ago

I want to make sure that by caching I mean

  1. For example, after a certain file in the workspace is edited, but the analysis result still shows old information?
  2. Or do you expect that after temporarily opening a file outside the workspace, and then closing the file, the project index will remove this file from the project index? This is a small problem, and I am fixing it.
CoffeeChaton commented 1 year ago

Instruction 1 is to discard the old project index, and re-scan the file from the workspace and create a new project index. I think since your problem is fixed by instruction 1, it will be more in line with case2. If it is case1, I need to observe it Behavior of vscdoe.

marius-sucan commented 1 year ago

It is case 1.

I was modifying the ahk file in the workspace, not outside and... i always got that weird result, instantly. When I used the option you suggested, it stalled for a while [to parse and compute the list]... and then I got the correct list.

Best regards, Marius.

CoffeeChaton commented 1 year ago

i using vscode.workspace.onDidChangeTextDocument at 0.0.22 (previous version) ,has the situation improved in any way?

If there is no improvement, can you provide a minimal reproducible project? And record a gif or mp4 and let me know the triggering process.

you can use screentogif OR below is the message I copied vscode gif bot, I think this will give a better description

Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, .gif files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev/ helpful as a browser-based gif recording tool.

If the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (Developer: Toggle Screencast Mode in the command palette). Lastly, please attach this file via the GitHub web interface as emailed responses will strip files out from the issue.

marius-sucan commented 1 year ago

I think it was improved. I no longer had issues. Thank you . I will let you know if I ever have issues again.

You can close the issue.

Best regards, Marius.

CoffeeChaton commented 1 year ago

Thanks, if you have a similar problem, please let me know