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

[Plug-in] workspace.findFiles not working as expected #4323

Closed
invincibleJai opened this issue Feb 13, 2019 · 11 comments
Closed

[Plug-in] workspace.findFiles not working as expected #4323

invincibleJai opened this issue Feb 13, 2019 · 11 comments
Assignees
Labels
bug bugs found in the application plug-in system issues related to the plug-in system Team: Che-Plugins issues related to the che-plugins team vscode issues related to VSCode compatibility

Comments

@invincibleJai
Copy link

invincibleJai commented Feb 13, 2019

Find files across all workspace folders in the workspace. https://code.visualstudio.com/api/references/vscode-api#workspace.findFiles

vscode.workspace.findFiles(include: GlobPattern, exclude?: GlobPattern | null, maxResults?: number, token?: CancellationToken): Thenable<Uri[]>

sample - findFiles('package.json', '**/node_modules/**', 10)

It's listing all occurrences of package.json even one inside node_modules which should be excluded and even this parameter count has no effect.

Currently, even relative pattern is not working as expected i.e

const relativePattern = new vscode.RelativePattern(
            workspaceFolder,
            '{pom.xml,**/package.json,requirements.txt}'
          );
vscode.workspace.findFiles(relativePattern, '**/node_modules')

it returns empty []

@slemeur
Copy link

slemeur commented Feb 14, 2019

@evidolob : Is that something your team can take care off?

@invincibleJai
Copy link
Author

Thanks @slemeur . I see it's been already implemented #3128 by @vparfonov but am experiencing above.

@invincibleJai
Copy link
Author

Guys, any update on this thread. Thanks!!

@vparfonov vparfonov self-assigned this Feb 19, 2019
@vparfonov vparfonov added the Team: Che-Plugins issues related to the che-plugins team label Feb 19, 2019
@vparfonov
Copy link
Contributor

@invincibleJai I will take a look

@akosyakov akosyakov added bug bugs found in the application plug-in system issues related to the plug-in system vscode issues related to VSCode compatibility labels Feb 28, 2019
@invincibleJai
Copy link
Author

@vparfonov thanks and for testing
am using image theiaide/theia-full:next

https://github.com/redhat-developer/vscode-openshift-tools/wiki/Testing

Will the changes be available there?

@vparfonov
Copy link
Contributor

vparfonov commented Mar 4, 2019

@invincibleJai Yes, if you run in with "next" it should be available

@invincibleJai
Copy link
Author

thanks @vparfonov, I tried on next and still i get same experience as in issue.

@vparfonov
Copy link
Contributor

@invincibleJai Can, you, please build it from source and check again. Also can you share plugin what you try? Thanks

@invincibleJai
Copy link
Author

@vparfonov am trying on https://marketplace.visualstudio.com/items?itemName=redhat.fabric8-analytics

Can you pls help with some doc to build from src, i tried some time back but couldn't

PS: it's using preview-html so am making changes to files in /tmp/vscode-unpacked/vscode_extension_redhat_fabric8_analytics.vsix/extension/ for debugging testing extension

@invincibleJai
Copy link
Author

@vparfonov need your help, have tried with latest theia-full:next and earlier when I filed the issue basic search without glob used to work as in

vscode.workspace.findFiles('target/npmlist.json')

but now even for this am getting an empty list. It'll be really nice if you can verify once.

@invincibleJai
Copy link
Author

invincibleJai commented Mar 13, 2019

@vparfonov it's working even with vscode.RelativePattern, one thing why i got confused initially is if we pass vscode.workspace.findFiles('target/npmlist.json') it returns empty list and when we change vscode.workspace.findFiles('**/target/npmlist.json') it's able to search.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application plug-in system issues related to the plug-in system Team: Che-Plugins issues related to the che-plugins team vscode issues related to VSCode compatibility
Projects
None yet
Development

No branches or pull requests

4 participants