Theia: Find in Folder - no results

Created on 16 Jan 2020  路  20Comments  路  Source: eclipse-theia/theia

Description

When using the "Find in Folder" option, no results are returned. The files can be found is searching all files, just not when searching specific directories.

Reproduction Steps

  • Copy text from file
  • Right click on a parent folder and click "Find in Folder"
  • Paste text and search

screencast-che-che dev edge-servers com-2020 01 16-12_14_57

OS and Theia version:

List of extensions:

  • @theia/core 0.14.0
  • @theia/output 0.14.0
  • @theia/process 0.14.0
  • @theia/filesystem 0.14.0
  • @theia/variable-resolver 0.14.0
  • @theia/workspace 0.14.0
  • @theia/languages 0.14.0
  • @theia/editor 0.14.0
needs more info bug help wanted search in workspace

Most helpful comment

@benoitf The repository is private but the project is a Magento project (https://github.com/magento/magento2/) . You could replicate the issue by searching for any term, for example if you were trying to find the string "class DefaultConfigProvider" in the file https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Checkout/Model/DefaultConfigProvider.php by searching within one of it's parent directories.

All 20 comments

Thank you for the issue! Could you please define reproducible steps for the example app running from sources?

@akosyakov I'm sorry I'm an end user and not sure what you mean by this. I've already explained the issue the best I can and included a screencast so hopefully this helps you find a resolution.

@vseager it would be nice if you can provide the link to the source code (like a github repository if it's public) and the string that you're searching with text format in the issue.

@benoitf The repository is private but the project is a Magento project (https://github.com/magento/magento2/) . You could replicate the issue by searching for any term, for example if you were trying to find the string "class DefaultConfigProvider" in the file https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Checkout/Model/DefaultConfigProvider.php by searching within one of it's parent directories.

I tried reproducing using the steps provided, I used Eclipse Theia to reproduce it, and the issue seems to be resolved already. The "Find in Folder" works perfectly fine in theia.
Screenshot from 2020-01-21 15-25-42

@Anasshahidd21 It is still an issue for me. Which version of Theia are you testing it in?

@Anasshahidd21 this seems to happen only in the vendor folder. I think the logic needs to be changed so that when explicitly searching "in folder", it ignores any ignore rules?

it ignores any ignore rules?

probably if you search in ignored folder only

Yeah, I think that's what it's doing and that should be changed?

I meant currently one cannot search in ignored folder, but we could suppress ignore filter if we detect that a search is started in such folder.

That would be awesome!

I meant currently one cannot search in ignored folder, but we could suppress ignore filter if we detect that a search is started in such folder.

I thought this was already the case (https://github.com/eclipse-theia/theia/issues/3917#issuecomment-450914317). If I search globally, the search will respect the .gitignore. If I narrow down the search to explicitly choose a directory to search from (find in folder), I do successfully get results from said folder.

_Search Globally_:

Screen Shot 2020-02-17 at 2 58 06 PM

_Searching Specifically in 'tmp/*' returns me gitignored results_:

Screen Shot 2020-02-17 at 2 58 18 PM

This doesn't work for me on the latest Eclipse Che, Theia@e1d08d00

Doesn't work for me either!

This is getting really annoying as a lot of code we search for is in the vendor/ folder, should we raise it on the eclipse/che repo instead?

This is getting really annoying, should we raise it on the eclipse/che repo instead?

I'm sorry, the community has been busy with other priorities (marked by the 'help wanted' label)
If the issue is important to you please don't hesitate to open a pull-request to resolve it.

Can you confirm if this is a Che or Theia issue?

Can you confirm if this is a Che or Theia issue?

@davidwindell I see that in theia, if we search for a term that is in an ignored folder/file (ex: file under node_modules), performing a 'search-in-workspace' does not yield any results unless we explicitly set 'include ignored files' option (eye icon):

_Searching Without 'Include Ignored Files'_

Screen Shot 2020-05-21 at 10 23 09 AM

_Searching With 'Include Ignored Files'_

Screen Shot 2020-05-21 at 10 23 18 AM

Ah, that does seem to help! I apologise for not spotting the eye icon. It does feel odd that when you explicitly request a folder to include it still excludes it without manual action. Let's go ahead and close this issue now.

Ah, that does seem to help! I apologise for not spotting the eye icon. It does feel odd that when you explicitly request a folder to include it still excludes it without manual action. Let's go ahead and close this issue now.

Closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Can't search Theia's Terminal
jankeromnes picture jankeromnes  路  3Comments

[markers] add problem markers for failed tests
vince-fugnitto picture vince-fugnitto  路  3Comments

[vscode] window.showQuickPick canPickMany is not supported
tetchel picture tetchel  路  3Comments

How to connect browser and Node.js?
jeanlucburot picture jeanlucburot  路  3Comments

debug: runInTerminal sends unescaped arguments to shell
marechal-p picture marechal-p  路  3Comments