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

Strange behavior of files.exclude in workspace with nested folders #118557

Closed
rubensa opened this issue Mar 9, 2021 · 4 comments · Fixed by #118777
Closed

Strange behavior of files.exclude in workspace with nested folders #118557

rubensa opened this issue Mar 9, 2021 · 4 comments · Fixed by #118777
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug file-explorer Explorer widget issues insiders-released Patch has been released in VS Code Insiders on-release-notes Issue/pull request mentioned in release notes verified Verification succeeded
Milestone

Comments

@rubensa
Copy link

rubensa commented Mar 9, 2021

Related Issues:
#116418
#114869
#114447
#102147
#98205
#96782
#95056
#45470
#45399

  • VS Code Version: 1.54.1
  • OS Version: Linux x64 5.8.0-44-generic

Steps to Reproduce:

  1. Create a root folder (files-exclude-sample)
  2. Inside that folder create two nested folders (child1, child2)
  3. In root folder (files-exclude-sample), create a workspace definition file (files-exclude-sample.code-workspace)
{
  "folders": [
    {
      "path": "."
    },
    {
      "path": "child1"
    },
    {
      "path": "child2"
    }
  ]
}
  1. In root folder (files-exclude-sample), create a .vscode folder
  2. Inside .vscode folder create a settings.json file
{
  // Configure glob patterns for excluding files and folders.
  "files.exclude": {
    "child1": true,
    "child2": true
  }
}
  1. Alternatively to previous steps, just clone this GitHub repo: https://github.com/rubensa/files-exclude-sample
  2. In VSCode, open the workspace (files-exclude-sample.code-workspace)
  3. Everything looks ok. You have tree root folders (files-exclude-sample, child1 and child2)
    Screenshot from 2021-03-09 17-03-02
  4. If you expand all three folder you can see something like
    Screenshot from 2021-03-09 17-03-45
  5. As specified in root folder .vscode/settings.json, child1 and child2 are excluded
  6. Open file.txt from child1 folder
  7. child1 folder is collapsed (not removed from explorer tree) and it appears inside root folder (files-exclude-sample) folder
    Screenshot from 2021-03-09 17-04-07
  8. The expected behavior is that child1 is not collapsed and it does not appear inside root folder

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

@bpasero
Copy link
Member

bpasero commented Mar 10, 2021

@TylerLeonhardt the owner of the file explorer is @isidorn

@bpasero bpasero removed their assignment Mar 10, 2021
@isidorn isidorn added bug Issue identified by VS Code Team member as probable bug file-explorer Explorer widget issues labels Mar 10, 2021
@isidorn isidorn added this to the Backlog milestone Mar 10, 2021
@isidorn
Copy link
Contributor

isidorn commented Mar 10, 2021

I acknowledge this issue. MR workspace support with when one root folder is a subfolder of another root folder has some issues.
If somebody is passionate about fixing this let me know and I can provide pointers

@jeanp413
Copy link
Contributor

Created #118777 fixing this

@isidorn isidorn modified the milestones: Backlog, March 2021 Mar 12, 2021
@isidorn
Copy link
Contributor

isidorn commented Mar 12, 2021

Thanks to a great pr by @jeanp413 this is now fixed ☀️

@aeschli aeschli added the verified Verification succeeded label Mar 25, 2021
@isidorn isidorn added the on-release-notes Issue/pull request mentioned in release notes label Mar 26, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 26, 2021
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 insiders-released Patch has been released in VS Code Insiders on-release-notes Issue/pull request mentioned in release notes verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants
@bpasero @rubensa @isidorn @aeschli @jeanp413 and others