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

GitHub Extension: vscode.workspace.findFiles() only covers committed files in vscode.dev #473

Open
thegecko opened this issue Aug 22, 2024 · 9 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug confirmed verification-found Issue verification failed
Milestone

Comments

@thegecko
Copy link

thegecko commented Aug 22, 2024

Does this issue occur when all extensions are disabled?: No

  • VS Code Version: 1.92.2 (VS Code for web running on vscode.dev)
  • OS Version: macOS 12.4

Steps to Reproduce:

  1. Open a GitHub repo in vscode.dev, e.g. https://vscode.dev/github/microsoft/vscode
  2. Install an extension which utilises the vscode.workspace.findFiles() API (for the rest of these steps, use this example)
  3. Execute the vscode.workspace.findFiles() function (example command: Find Files) and search with a glob (e.g. **/*.mjs) - the correct files are found
  4. Create a new file in the workspace which matches the glob used in the search (e.g. temp.mjs)
  5. Re-run the search and observe the results remain the same. The new file is not found.

Expected: All files in the workspace are included in the vscode.workspace.findFiles() results, not just ones under source control.

Note: this works as expected using the local filesystem in vscode.dev

@andreamah
Copy link

Does this still reproduce in https://insiders.vscode.dev/? I have made a few changes to the API since the last release, and looking at the code, I can see that it shouldn't be looking at git at all. In your case, was *.mjs in your .gitignore?

@andreamah andreamah added the info-needed Issue requires more information from poster label Sep 3, 2024
@thegecko
Copy link
Author

thegecko commented Sep 3, 2024

Does this still reproduce in https://insiders.vscode.dev/?

Yes, I just tested this in insiders and it's still an issue

Screenshot 2024-09-03 at 20 03 32

In your case, was *.mjs in your .gitignore?

No: https://github.com/microsoft/vscode/blob/main/.gitignore

@andreamah
Copy link

Is this a new regression as of 1.92.2? Or did you only notice it recently?

@joyceerhl do you know whether there is a known issue with the vscode.dev fileSearchProvider?

@thegecko
Copy link
Author

thegecko commented Sep 4, 2024

Is this a new regression as of 1.92.2? Or did you only notice it recently?

I've only just come across this issue while developing an extension, so can't comment on whether it's a regression or not.

@joyceerhl joyceerhl transferred this issue from microsoft/vscode Sep 4, 2024
@joyceerhl joyceerhl assigned joyceerhl and unassigned andreamah Sep 4, 2024
@joyceerhl joyceerhl added bug Issue identified by VS Code Team member as probable bug confirmed and removed info-needed Issue requires more information from poster labels Sep 4, 2024
@joyceerhl joyceerhl added this to the September 2024 milestone Sep 4, 2024
@thegecko
Copy link
Author

thegecko commented Sep 4, 2024

Thanks for the transfer, will the fix be in the September release?

@joyceerhl
Copy link
Contributor

You should be able to verify this fix in the current insiders.vscode.dev

@thegecko
Copy link
Author

thegecko commented Sep 5, 2024

Thanks @joyceerhl

I tried the current insiders release and still see the issue. Notice the test.mjs file is not found:

Screenshot 2024-09-05 at 16 41 37

Version: 1.93.0-insider
Commit: 4849ca9bdf9666755eb463db297b69e5385090e3
Date: 2024-09-04T13:13:15.344Z
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36

@andreamah andreamah reopened this Sep 26, 2024
@andreamah andreamah added the verification-found Issue verification failed label Sep 26, 2024
@andreamah
Copy link

@thegecko just checking- does it still not work on today's insiders?

@thegecko
Copy link
Author

@thegecko just checking- does it still not work on today's insiders?

Still doesn't work in https://insiders.vscode.dev/github/microsoft/vscode

Version: 1.94.0-insider
Commit: c43f508b732d24b0c4732de9db2b38b4c5b88b8a
Date: 2024-09-26T05:04:07.935Z
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36

Screenshot 2024-09-26 at 18 46 26

Neither staged nor uncommitted files are returned in findFiles()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug confirmed verification-found Issue verification failed
Projects
None yet
Development

No branches or pull requests

3 participants