Vscode-intelephense: Go to definition only working if I opened the file first

Created on 16 Sep 2019  路  8Comments  路  Source: bmewburn/vscode-intelephense

Most helpful comment

Great. I'll leave this open for the time being to see if I can find out how the cache got in that state.

All 8 comments

It should index the workspace and/or fetch a cached index when the extension first starts. Is there any information in the output tab that might be helpful in debugging this?

[Info  - 1:55:55 AM] Initialising intelephense 1.2.3
[Info  - 1:55:55 AM] Reading state from c:\Users\John\AppData\Roaming\Code\User\workspaceStorage\9acec4876a48887fff2bb039e75aaed6\bmewburn.vscode-intelephense-client\7065ceb1.
[Info  - 1:55:56 AM] Initialised in 358 ms
[Info  - 1:55:56 AM] Indexing started.
[Warn  - 1:55:56 AM] file:///c%3A/Google%20Drive/Web/www/fichar/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Text.php is over the maximum file size of 1000000 bytes.
[Info  - 1:55:59 AM] Indexing ended. 134 files indexed in 3s.
[Info  - 1:55:59 AM] Writing state to c:\Users\John\AppData\Roaming\Code\User\workspaceStorage\9acec4876a48887fff2bb039e75aaed6\bmewburn.vscode-intelephense-client\7065ceb1.
[Info  - 1:56:00 AM] Wrote state in 0.7s.

Then I removed Faker, closed VS Code, opened it and here's the output this time:

[Info  - 2:03:11 AM] Initialising intelephense 1.2.3
[Info  - 2:03:11 AM] Reading state from c:\Users\John\AppData\Roaming\Code\User\workspaceStorage\9acec4876a48887fff2bb039e75aaed6\bmewburn.vscode-intelephense-client\7065ceb1.
[Info  - 2:03:11 AM] Initialised in 332 ms
[Info  - 2:03:12 AM] Indexing started.
[Info  - 2:03:12 AM] Indexing ended. 446 files indexed in 0s.
[Info  - 2:03:12 AM] Writing state to c:\Users\John\AppData\Roaming\Code\User\workspaceStorage\9acec4876a48887fff2bb039e75aaed6\bmewburn.vscode-intelephense-client\7065ceb1.
[Info  - 2:03:13 AM] Wrote state in 0.7s.

Same outcome though. Oddly enough, it can find Firma.php but not Empleado.php. Just the vendor folder alone has 8.6k files (without Faker). After that, it's:

[Info  - 2:08:09 AM] Initialising intelephense 1.2.3
[Info  - 2:08:09 AM] Reading state from c:\Users\John\AppData\Roaming\Code\User\workspaceStorage\9acec4876a48887fff2bb039e75aaed6\bmewburn.vscode-intelephense-client\7065ceb1.
[Info  - 2:08:10 AM] Initialised in 323 ms

Can you post your settings for files.associations, files.exclude, intelephense.files.associations, intelephense.files.exclude?

{
    "files.associations": {
        "*.css": "postcss",
        "*.html": "html"
    }
}

Only thing that comes to mind is that it's some sort of permission issue or something about the directory structure that means the glob lib can't traverse the files. You could try ctrl + shift +p then search for Index workspace to force it to index again but it seems like it can't find the files for some reason.

That command just fixed it, it would seem.

[Info  - 2:39:44 AM] Initialising intelephense 1.2.3
[Info  - 2:39:44 AM] Initialised in 23 ms
[Info  - 2:39:44 AM] Indexing started.
[Warn  - 2:39:44 AM] file:///c%3A/Google%20Drive/Web/www/fichar/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Text.php is over the maximum file size of 1000000 bytes.
[Info  - 2:39:53 AM] Indexing ended. 4962 files indexed in 9s.
[Info  - 2:39:53 AM] Writing state to c:\Users\John\AppData\Roaming\Code\User\workspaceStorage\9acec4876a48887fff2bb039e75aaed6\bmewburn.vscode-intelephense-client\7065ceb1.
[Info  - 2:39:54 AM] Wrote state in 1.4s.

Great. I'll leave this open for the time being to see if I can find out how the cache got in that state.

Closing, there were fixes in 1.5 that corrected an issue with the index becoming corrupted.

Was this page helpful?
0 / 5 - 0 ratings