Open xavier-ottolini opened 4 years ago
Can you share some more details and check whether the tips in https://github.com/microsoft/vscode/wiki/Search-Issues#missing-search-results help?
Hello Rob,
I have read the tips. The files that I try to open with Ctrl + P are not in a seach.exclude setting, files.exclude settings or in .gitignore settings. If I try to search them with Ctrl + shift + F, the files are found. The files are encoded in UTF.
I have notice that when I try to quick open with Ctrl + P a file, a message "spawn ENAMETOOLONG" is displayed in the status popup window.
I some logs can be enabled to get more information, could you tell me how to enable them and find them ?
I have notice that when I try to quick open with Ctrl + P a file, a message "spawn ENAMETOOLONG" is displayed in the status popup window.
Ah, that's a good clue. We are probably generating a command line command which is too long. Please do the following
Here is the log output. quick-search.log
Ok, yeah you seem to have tons of excluded folders, so the command that we generate is too long. I should try to improve this experience so I'll leave this open.
You can work around it by getting rid of some excluded patterns, or moving those patterns to a .ignore
file.
Hello,
Thank you for your advices of workaround by removing some excluded patterns. He have also noticed that when the paths overrides 70 characters, there are some problems to search.
Regards,
Xavier
I have the same issue, the message "spawn ENAMETOOLONG" pops up in several occations (including search). This always happens when I have many "files.exclude" entries in the settings.json. In my current project I have 1242 exludes set, this is obviously not supported. The entry count seems to be less relevant, it is the sum of the entry lengths that matters!
As mentioned in the linked issue #149727: introducing an option to not add the excluded files to the search command parameters would solve this issue (for me). The files you want to exclude from the search can be added to an .ignore file
Issue is still apparent
Does anyone have a temporary fix or something so I could try debugging this problem? It's really annoying since I use the search option very often.
This problem JUST started happening to me today. It comes/goes based on the setting of the exclude button in search:
However, my list of exclusions seems short: .dbb,.evt,.log,.err,.rec,.asmdump,.symmap,.map,*.wrn
and it happens when the exclusions are NOT excluding anything (i.e. when all files are searched).
I have seen other reports based on number of open files, or number of source-control-pending files, but I have neither. I also have all extensions disabled.
Can someone please provide more details about the cause and workarounds/fixes here? This has apparently been a long-standing bug.
Thanks!
2023-05-26 16:03:02.918 [error] A system error occurred (spawn ENAMETOOLONG): Error: A system error occurred (spawn ENAMETOOLONG) at M (vscode-file://vscode-app/c:/Users/bradlit/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1829:6480) at vscode-file://vscode-app/c:/Users/bradlit/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1837:4256 at async vscode-file://vscode-app/c:/Users/bradlit/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1837:2747 at async e.SearchService.textSearch (vscode-file://vscode-app/c:/Users/bradlit/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1837:2022) at async e.SearchModel.H (vscode-file://vscode-app/c:/Users/bradlit/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2246:10010)
When I press on Ctrl + P and enter the name of some JS or TS file, the files are not found. Only the last opened files are available. This is a recent problem, that appeared on the 1.45.1 version of Visual Studio code.