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

"Files to include" in search does not search for all partial matches #92559

Closed
sienkiewiczkm opened this issue Mar 12, 2020 · 5 comments
Closed
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster

Comments

@sienkiewiczkm
Copy link

Issue Type: Bug

  1. Open search sidebar
  2. Search for something from various directories
  3. Try to narrow down searches using "files to include" input
    • typing whole filename/directory in path will work as expected
    • typing suffix of filename/directory in path will work as expected
    • typing prefix or something from the middle of filename/directory in path will not return expected results, for example, if looking for something in the middle stars are required, eg. *ries* if searching for factories

In previous releases any substring was accepted, so it appears to be regression.

VS Code version: Code 1.43.0 (78a4c91, 2020-03-09T19:44:52.965Z)
OS version: Linux x64 5.0.0-38-generic

System Info
Item Value
CPUs Intel(R) Core(TM) i5-8600K CPU @ 3.60GHz (6 x 4189)
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
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_renderer: disabled_off_ok
video_decode: unavailable_off
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) 1, 1, 1
Memory (System) 15.62GB (0.24GB free)
Process Argv --no-sandbox --unity-launch
Screen Reader no
VM 0%
Extensions (11)
Extension Author (truncated) Version
npm-intellisense chr 1.3.0
path-intellisense chr 1.4.2
vscode-markdownlint Dav 0.34.0
vscode-eslint dba 2.1.1
vscode-npm-script eg2 0.3.11
mdmath goe 2.4.0
python ms- 2020.2.64397
code-spell-checker str 1.8.0
vscode-icons vsc 10.0.0
vim vsc 1.13.0
markdown-all-in-one yzh 2.7.0

(1 theme extensions excluded)

@roblourens
Copy link
Member

In previous releases any substring was accepted, so it appears to be regression.

I don't think that is true. It has always required a glob star to match your example, at least that is the way it is intended to work.

@roblourens roblourens added the info-needed Issue requires more information from poster label Mar 15, 2020
@sienkiewiczkm
Copy link
Author

sienkiewiczkm commented Mar 15, 2020

I don't think that is true. It has always required a glob star to match your example, at least that is the way it is intended to work.

You're right, it seems it required stars for all cases. Currently search works for me really unreliably, sometimes results appear to change once I search again after few another searches. Examples:

Test file tree, each contains findme phrase which I search for:

.
└── components
   ├── boxes
   │  └── basic.js
   └── buttons
      ├── fancy.js
      ├── index.js
      └── simple.ts

Values I search for in order:

Include Results
.js all js files, star not required, OK
.ts all ts files, star not required, OK
compo nothing - OK
ents components/buttons/simple.ts, wrong - no star, why matched?
es nothing, OK - no star
ttons components/buttons/simple.ts, wrong
ncy.js nothing, OK - no star
ple.ts components/buttons/simple.ts, wrong, no star
nothing all files, OK
boxes, buttons corresponding files, OK
ple.ts components/buttons/simple.ts, wrong, no star

@roblourens
Copy link
Member

It seems likely that simple.ts is open, in which case it will be searched anyway even if it doesn't match. Is that the case? There is another bug on this. .ts is a special case just since it's so common, so it doesn't need a star.

@sienkiewiczkm
Copy link
Author

simple.ts was opened, correct - the same behaviour is present for any other file.

So in conclusion, for closed files search works as expected (using glob), but for opened files include filter is flawed and seems to be matched when any element on the path ends with the include filter (see compo and ents for the same components folder in the example above).

Should I close this ticket and open a new one with cleaner description? Thank you for helping with specifying what's exactly wrong with this one.

@roblourens
Copy link
Member

Simpler than that, open files are always searched. There is already an open issue for it: #31819

@roblourens roblourens added the *duplicate Issue identified as a duplicate of another issue(s) label Mar 29, 2020
@github-actions github-actions bot locked and limited conversation to collaborators May 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants