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

Search results are showing from excluded files #115897

Closed
sujithmathewthomas opened this issue Feb 5, 2021 · 9 comments
Closed

Search results are showing from excluded files #115897

sujithmathewthomas opened this issue Feb 5, 2021 · 9 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) search Search widget and operation issues

Comments

@sujithmathewthomas
Copy link

sujithmathewthomas commented Feb 5, 2021

Issue Type: Bug

In the left hand side global search, I have given a folder path in files to include field (src/app/company/) and I've given a subfolder of the previous path in files to exclude field (src/app/company/components/company-details/). Initally it was working fine, but when I open a file from this excluded directory in editor, the results from that particular file is then being shown in global search results, even though it comes under the excluded field. If I close that file and search again,it is gone from the search results.

VS Code version: Code 1.52.1 (ea3859d, 2020-12-16T16:32:10.090Z)
OS version: Linux x64 5.4.0-65-generic

System Info
Item Value
CPUs Intel(R) Core(TM) i7-9700F CPU @ 3.00GHz (8 x 4400)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: unavailable_off
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 1, 1, 1
Memory (System) 15.57GB (4.78GB free)
Process Argv --no-sandbox --unity-launch --crash-reporter-id 8b7a7f68-b84e-4aeb-8570-f9f8d533db39
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11
Extensions (6)
Extension Author (truncated) Version
gitlens eam 11.2.1
vscode-docker ms- 1.9.1
remote-containers ms- 0.155.1
vscode-typescript-tslint-plugin ms- 1.3.3
vscode-scss-formatter sib 2.1.0
eno Wsc 2.3.53
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30211402
vstry244cf:30250196
pythonvsdeb440:30248342
pythonvsded773:30248341
pythonvspyt875:30251590

@JacksonKearl
Copy link
Contributor

cc @roblourens

@JacksonKearl
Copy link
Contributor

JacksonKearl commented Feb 5, 2021

I haven't been able to reproduce this, could you try updating to 1.53.0? We made some changes to filtering logic last iteration that might help here. If the issue persists please include a screen recording so I can better identify the problem.

@JacksonKearl
Copy link
Contributor

\gifPlease

@JacksonKearl JacksonKearl added the info-needed Issue requires more information from poster label Feb 5, 2021
@sujithmathewthomas
Copy link
Author

sujithmathewthomas commented Feb 5, 2021

@JacksonKearl I've updated VS code to 1.53.0, but the issue still persists. Im attatching a screen recording. As you can see, I've excluded file2.txt from the search. But when I open it, it is being shown in the search. Again when I'm closing it, it is gone from the search.
recording

Version: 1.53.0
Commit: 8490d3d
Date: 2021-02-03T15:56:04.185Z
Electron: 11.2.1
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Linux x64 5.4.0-65-generic

@JacksonKearl
Copy link
Contributor

In that specific case we don't support ~ in the excludes, but removing it should work as expected. Is there a case where you have a folder open and see this behaviour for relative paths inside the folder?

@sujithmathewthomas
Copy link
Author

I've moved that to another folder and now I'm not using ~. Still the issue persists.
recording (1)

@JacksonKearl
Copy link
Contributor

Thanks, I can reproduce it. As a workaround it should mostly work without the leading ./, but of course that would exclude matching subdirectories too.

@JacksonKearl JacksonKearl added bug Issue identified by VS Code Team member as probable bug search Search widget and operation issues and removed info-needed Issue requires more information from poster labels Feb 5, 2021
@JacksonKearl JacksonKearl added this to the Backlog milestone Feb 5, 2021
@roblourens
Copy link
Member

Two issues here - as a general issue, an absolute path to an individual file won't work well in includes or excludes. But also, an open file will still be searched even if it's excluded: #31819. I will close this as a dupe of that. The first is basically covered by the search API issues.

@roblourens roblourens removed this from the Backlog milestone Feb 5, 2021
@roblourens roblourens added the *duplicate Issue identified as a duplicate of another issue(s) label Feb 5, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Mar 22, 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 *duplicate Issue identified as a duplicate of another issue(s) search Search widget and operation issues
Projects
None yet
Development

No branches or pull requests

4 participants
@roblourens @JacksonKearl @sujithmathewthomas and others