Skip to content
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

Indexing seems to not exclude excluded paths #3110

Open
smuuf opened this issue Nov 1, 2024 · 0 comments
Open

Indexing seems to not exclude excluded paths #3110

smuuf opened this issue Nov 1, 2024 · 0 comments

Comments

@smuuf
Copy link

smuuf commented Nov 1, 2024

Context
Sometimes (nowadays pretty often) intelephense seems to be stuck indexing (which is seen in status bar) but never finishing and intelephense then doesn't seem to be working ("go-to" ctrl+click, for example, does nothing). Looking at intelephense in vscode's "output" tab I see lots of Searching ... for files to index. entries. And until I restart vscode it seems to be stuck (even Intelephense: Cancel indexing command does nothing).

Describe the bug
Even though I have exclusion globs explicitly specified in vscode's settings.json (I also tried it in .vscode/settings.json in the repo, but with the same result):

	"intelephense.files.exclude": [
		"**/.git/**",
		"**/.svn/**",
		"**/.hg/**",
		"**/CVS/**",
		"**/.DS_Store/**",
		"**/node_modules/**",
		"**/bower_components/**",
		"**/vendor/**/{Tests,tests}/**",
		"**/.history/**",
		"**/vendor/**/vendor/**",
	],

... intelephense seems to ignore that and still scans files/directories matching **/node_modules/** glob:

...
[Info  - 11:39:42 AM] Searching file:///mnt/w/my_app/ui/node_modules/is-shared-array-buffer/.github for files to index.
[Info  - 11:39:42 AM] Searching file:///mnt/w/my_app/ui/node_modules/is-string/.github for files to index.
[Info  - 11:39:42 AM] Searching file:///mnt/w/my_app/ui/node_modules/is-symbol/.github for files to index.
...
[Info  - 11:39:45 AM] Searching file:///mnt/w/my_app/ui/node_modules/es-iterator-helpers/node_modules/get-intrinsic/.github for files to index.
[Info  - 11:39:45 AM] Searching file:///mnt/w/my_app/ui/node_modules/es-iterator-helpers/node_modules/internal-slot/.github for files to index.
[Info  - 11:39:45 AM] Searching file:///mnt/w/my_app/ui/node_modules/es-iterator-helpers/node_modules/define-properties/.github for files to index.
...
[Info  - 11:40:27 AM] Searching file:///mnt/w/my_app/ui/node_modules/%40jest/core/node_modules/%40babel/template/node_modules/.bin for files to index.
[Info  - 11:40:27 AM] Searching file:///mnt/w/my_app/ui/node_modules/%40jest/core/node_modules/%40babel/traverse/node_modules/.bin for files to index.
[Info  - 11:40:27 AM] Searching file:///mnt/w/my_app/ui/node_modules/%40jest/reporters/node_modules/%40babel/core/node_modules/.bin for files to index.
...

Expected behavior
I've expected intelephense not to even scan these paths, since I have **/node_modules/** in the list of exclusions.

Platform and version

  • Windows 11 + WSL1
  • vscode 1.95.0
  • intelephense 1.12.6
    • 1.12.2 too
    • 1.11.1 too

Additional notes
This doesn't seem to happen every time intelephense does indexing.

After vscode starts and intelephense loads the indexing seems to be pretty quick. Even after I removed the /home/smuuf/.vscode-server/data/User/workspaceStorage/cc335c7725f69ba2b44d83a4dfb92d54/bmewburn.vscode-intelephense-client/3c91af60 directory, which I guess is the cache and deleting it should force full rescan (? 🤷 ), it was fast.

[Info  - 3:21:37 PM] Initialising intelephense 1.12.2
[Info  - 3:21:37 PM] Reading state from /home/smuuf/.vscode-server/data/User/workspaceStorage/cc335c7725f69ba2b44d83a4dfb92d54/bmewburn.vscode-intelephense-client/3c91af60.
[Info  - 3:21:37 PM] Intelephense premium features enabled.
[Info  - 3:21:37 PM] Initialised in 54 ms
[Info  - 3:21:39 PM] Searching file:///home/smuuf/.vscode-server/extensions/bmewburn.vscode-intelephense-client-1.12.2/node_modules/intelephense/lib/stub for files to index.
[Info  - 3:21:39 PM] Searching file:///mnt/w/my_app for files to index.
[Info  - 3:21:40 PM] Indexing started.
[Info  - 3:21:48 PM] Indexing ended. 4662 files indexed in 9s.
[Info  - 3:21:48 PM] Writing state to /home/smuuf/.vscode-server/data/User/workspaceStorage/cc335c7725f69ba2b44d83a4dfb92d54/bmewburn.vscode-intelephense-client/3c91af60.
[Info  - 3:21:49 PM] Wrote state in 1.2s.

... but after having vscode opened for a while and doing common work, then the "weird indexing" starts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant