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

Include ignored files in vscode.workspace.findFiles #14365

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

msujew
Copy link
Member

@msujew msujew commented Oct 28, 2024

What it does

Closes #6460

Extends the options used for finding files via the VS Code API. The current API was very limited and could not correctly identify whether to exclude git ignored files.

This change adjusts the options to always include git ignored files when calling vscode.workspace.findFiles.

How to test

  1. Download and install this test plugin (source here)
  2. Open the example folder.
  3. Run the Test: Find Files command.
  4. It should find 3 files (only finds 2 on master).

Review checklist

Reminder for reviewers

@msujew msujew added filesystem issues related to the filesystem vscode issues related to VSCode compatibility labels Oct 28, 2024
@msujew msujew requested a review from tsmaeder October 28, 2024 15:00
@tsmaeder
Copy link
Contributor

So this PR aligns the behaviour with the doc at https://code.visualstudio.com/api/references/vscode-api#FileSystem, right? In particular when exclude is null.

@msujew
Copy link
Member Author

msujew commented Oct 29, 2024

So this PR aligns the behaviour with the doc at https://code.visualstudio.com/api/references/vscode-api#FileSystem, right? In particular when exclude is null.

Yes, the PR in general is just there to align the behavior of findFiles to VS Code.

@tsmaeder
Copy link
Contributor

@msujew something seems amiss here: Here's what I do:

  1. I add the file "a.txt" to the sample folder (it seems to be required, but missing)
  2. I open the sample folder
  3. I do "Test Find Files".
  4. I get 3 results, whether with or without this PR. What gives?

@msujew
Copy link
Member Author

msujew commented Oct 30, 2024

@tsmaeder I'm actually confused as well - I didn't really test the behavior previously on Theia, I just assumed the report over at #6460 (comment) to be accurate. However, I cannot reproduce this issue either on master right now. Asking for better repro steps on the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filesystem issues related to the filesystem vscode issues related to VSCode compatibility
Projects
Status: Waiting on reviewers
Development

Successfully merging this pull request may close these issues.

Workspace.findFiles don't works
2 participants