microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.76k stars 29.1k forks source link

File exclusion at workspace level is not working #156814

Closed magdumnikhil closed 2 years ago

magdumnikhil commented 2 years ago

Issue Type: Bug

Create the tree structure as follow:

C:\Users\admin\Desktop\new>tree /f
Folder PATH listing for volume OS
Volume serial number is xxxx-xxxx
C:.
│   p1.code-workspace
│
└───project
    ├───p1
    │   ├───p1_1
    │   │       a1.c
    │   │
    │   └───p1_2
    │           a2.c
    │
    └───p2
        ├───p2_1
        │       a1.c
        │
        └───p2_2
                a2.c

Content of p1.code-workspace

{
    "folders": [
        {
            "path": "project\\p1"
        },
        {
            "path": "project\\p2"
        }
    ],
    "settings": {
        "files.exclude": {
            "project\\p1\\p1_2\\**": true,
            "project\\p2\\p2_1\\**": true,
        },
        "files.watcherExclude": {
            "project\\p1\\p1_2\\**": true,
            "project\\p2\\p2_1\\**": true,
        }
    }
}

Open the workspace in vscode.

Observed: All the files in the folder are listed in the explorer as well as appear in the quick picker (ctrl + p)

Expected: The files/folders excluded in the setting should not appear in the explorer and quick picker.

This behavior could be superset of #155837

VS Code version: Code 1.69.2 (3b889b090b5ad5793f524b5d1d39fda662b96a2a, 2022-07-18T16:12:52.460Z) OS version: Windows_NT x64 10.0.22000 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz (16 x 2496)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|31.73GB (18.43GB free)| |Process Argv|--crash-reporter-id 85c323a1-5d98-45e5-8818-74519d9e3b95| |Screen Reader|no| |VM|0%|
Extensions (24) Extension|Author (truncated)|Version ---|---|--- project-manager|ale|12.6.1 asciidoctor-vscode|asc|2.9.8 atlascode|atl|2.10.12 docs-view|bie|0.0.11 codealignment-vscode|cpm|2.0.19 doxdocgen|csc|1.4.0 arm|dan|1.7.4 plantuml|jeb|2.17.3 vscode-clangd|llv|0.1.21 python|ms-|2022.10.1 vscode-pylance|ms-|2022.7.40 jupyter|ms-|2022.6.1201981810 jupyter-keymap|ms-|1.0.0 jupyter-renderers|ms-|1.0.9 remote-ssh|ms-|0.84.0 remote-ssh-edit|ms-|0.80.0 remote-wsl|ms-|0.66.3 cpptools|ms-|1.11.4 tmlanguage|ped|0.12.0 vscode-commons|red|0.0.6 vscode-xml|red|0.21.2022062916 vscode-yaml|red|1.9.1 errorlens|use|3.6.0 linkerscript|Zix|1.0.2 (1 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonvspyt551cf:30345471 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscoreces:30445986 pythondataviewer:30285071 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 vsc1dst:30438360 pythonvs932:30410667 wslgetstarted:30449410 vscscmwlcmt:30465135 cppdebug:30492333 pylanb8912:30529769 vsclangdf:30486550 c4g48928:30535728 ```
gjsjohnmurray commented 2 years ago

Do you get the same results if you change all your \\s to / ?

magdumnikhil commented 2 years ago

Yes.

Screenshot (69)

gjsjohnmurray commented 2 years ago

Based on https://github.com/microsoft/vscode/issues/50638#issuecomment-721685105 and #48262 it's not currently possible to do this with settings in your .code-workspace file. You can do it by putting the setting in the .vscode/settings.json of the folder you want it to apply to, but then it will apply on every .code-workspace that includes the folder, and also if you open the folder directly.

vscodenpa commented 2 years ago

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

vscodenpa commented 2 years ago

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

vscodenpa commented 2 years ago

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!