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

findNonIgnoredFiles-git-exec-error Error: spawn ENAMETOOLONG #155

Open
fpopineau opened this issue Nov 11, 2021 · 1 comment
Open

findNonIgnoredFiles-git-exec-error Error: spawn ENAMETOOLONG #155

fpopineau opened this issue Nov 11, 2021 · 1 comment
Labels
wontfix This will not be worked on

Comments

@fpopineau
Copy link

fpopineau commented Nov 11, 2021

Description of the problem I encountered
I tried to setup a scheme for my projects which ended up in opening a very large workdir.
I got this error findNonIgnoredFiles-git-exec-error Error: spawn ENAMETOOLONG related to the fact that the command line spawn is actually too long.

Describe the solution you'd like
I think that the way the findNonIgnoredFiles-git-exec-error the function is written, the limit will be reached quite quickly.
I wonder if there is an alternative option using the vscode API to find these files?

[EDIT] I have found a dirty workaround. I have lengthened the lists files.exclude and search.exclude, but that was not sufficient. I ended up in restricting tightly the places where to look for files, and disabling the check with git. All of this happens in a single call, which could benefit from configurability:

@@ -602,7 +611,7 @@ export class NoteWorkspace {
     let that = this;

     // let files = await vscode.workspace.findFiles('**/*');
-    let files = await findNonIgnoredFiles('**/*');
+    let files = await findNonIgnoredFiles('**/@Drafts/**/*', false);
     files = files.filter((f) => f.scheme == 'file' && f.path.match(that.rxFileExtensions()));
     this.noteFileCache = files;
     return files;

Both the pattern and the git check could be made configurable in the call to findNonIgnoredFiles.

Regards,

@kortina
Copy link
Owner

kortina commented Nov 16, 2021

At the time of writing, there was no way to use a vscode API that would correctly ignore all the same files as this custom function. I am pretty sure files.exclude and search.exclude existed, but I did not want to duplicate other ignore files (and things like my global ~/.ignore file in those settings files.

@kortina kortina added the wontfix This will not be worked on label Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants