-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Workspace.findFiles don't works #6460
Comments
Is there any chance of getting this fixed? It seems to affect workspaceContains activation event for plugins -- it doesn't fire in theia, while working fine in vscode. I've narrowed it down to workspace.findFiles that returns different results in theia, compared to vscode. It's a fairly basic C project with some build artifacts, file count is 361, so it's not even that big. |
@vnfedotov if you're interested, please feel free to provide a pull-request to address the issue. |
@vince-fugnitto I'll look into it. Its FileSearchServiceImpl, is it? |
@vince-fugnitto I think i've figured it out, but in my case it's a different issue related to ripgrep options, I've opened a new issue: #8669 |
I am also having troubles with It looks like the |
I've submitted a PR to fix this. See #14365. |
@chroberino Thanks for looking into it. Can you supply us with a git repo or something that reproduces this issue (and ideally the respective arguments for the |
@msujew, sorry I totally missed your reply/question. At the moment I don't have a public repo to share. But I can share the method where Let me explain what I tried to do: private async generateInitGdb(): Promise<void> {
const workspaceFolder = vscode.workspace.workspaceFolders?.[0].uri.fsPath;
if (!workspaceFolder) {
vscode.window.showErrorMessage("Workspace folder not found.");
return;
}
const directories = new Set<string>();
const searchFiles = async (extension: string) => {
const files = await vscode.workspace.findFiles(`Temp/**/*.${extension}`);
files.forEach(file => {
const dir = path.dirname(file.fsPath);
directories.add(dir);
});
};
await searchFiles('out');
//await searchFiles() for further file extensions of interest
// Check if there are directories to add to solib-search-path
if (directories.size === 0) {
vscode.window.showInformationMessage("No relevant files found; .initgdb file not created.");
return;
}
// Create semicolon-separated list of directories
const solibSearchPath = Array.from(directories).join(';');
const initGdbContent = `set solib-search-path ${solibSearchPath}`;
// Write to .initgdb file
const initGdbPath = path.join(workspaceFolder, '.initgdb');
fs.writeFileSync(initGdbPath, initGdbContent);
vscode.window.showInformationMessage(".initgdb file generated successfully.");
} Just for the sake of completeness: import * as vscode from 'vscode';
import * as fs from 'fs';
import * as path from 'path'; The Running my extension in VS Code and triggering this method finds all relevant files in the Removing the line |
Description
when opening a large project lets say a linuxRootFs search in folders or any other search returns no results on any pattern
Reproduction Steps
OS and Theia version:
theia next docker
Diagnostics:
The text was updated successfully, but these errors were encountered: