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

History: files.exclude no longer applies #29520

Closed
bpasero opened this issue Jun 27, 2017 · 2 comments
Closed

History: files.exclude no longer applies #29520

bpasero opened this issue Jun 27, 2017 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug file-explorer Explorer widget issues verified Verification succeeded
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Jun 27, 2017

Steps to Reproduce:

  1. open a workspace with one folder that contains another folder "qunit" with some files
  2. F1 > Clear Editor History
  3. open some files from the qunit folder to add them to quick open history
  4. Open settings and define a files.exclude like this:
"files.exclude": {
    "**/.git": true,
    "**/.svn": true,
    "**/.hg": true,
    "**/CVS": true,
    "**/.DS_Store": true,
    "**/qunit/**": true
}

=> the qunit folder should now hide from the explorer
=> bring up quick open and notice the file from qunit still showing up

This is unexpected, I have code that listens to changes to the files.exclude pattern and remove entries that no longer match. When I debug this I end up in this location right before I enter ParsedExpression here: https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/services/history/browser/history.ts#L428

The pattern does not match, but I verified that the setting is the one as defined. It gets created right here: https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/services/history/browser/history.ts#L127

Is there something wrong with parsing maybe?

@chrmarti I have lost the ability to understand or even debug our glob implementation. Assigning to you in the hope that you have better ways of doing so. I think what we need is a way to log exactly how the matching happens within glob. Today this method is so heavily optimized and complex that I always loose myself in it.

@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug file-explorer Explorer widget issues labels Jun 27, 2017
@chrmarti
Copy link
Contributor

Should have documented this: trimForExclusions is an optimization that only works for exclusions in a tree traversal. It simplifies the pattern to only match the folder 'qunit', but not the files in it. In a tree traversal that is enough and a much faster check to do. Opened a PR to clarify.

@bpasero
Copy link
Member Author

bpasero commented Jun 27, 2017

@chrmarti thanks

@bpasero bpasero closed this as completed Jun 27, 2017
@bpasero bpasero added this to the June 2017 milestone Jun 27, 2017
@bpasero bpasero added the verified Verification succeeded label Jun 28, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug file-explorer Explorer widget issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

2 participants