microsoft / vscode

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

$(basename).ts hiding JS files without associated TS files #31956

Closed massimocode closed 7 years ago

massimocode commented 7 years ago
Extension Author (truncated) Version
path-intellisense chr 1.4.2
vscode-eslint dba 1.2.11
githistory don 0.2.2
vscode-style-formatter dwe 1.0.0
EditorConfig Edi 0.9.4
tslint eg2 0.17.0
vscode-csproj luc 0.7.0
vscode-scss mrm 0.6.2
csharp ms- 1.11.0
PowerShell ms- 1.4.1
typescript-javascript-grammar ms- 0.0.23
vscode-subword-navigation ow 1.1.5
ejs-language-support Qas 0.0.1
Ruby reb 0.12.1
vscode-icons rob 7.12.0
cucumber ste 0.9.6
quokka-vscode Wal 1.0.45
wallaby-vscode Wal 1.0.56

Steps to Reproduce:

  1. I have the following piece of config inside my user settings:
    "files.exclude": {
        "**/.git": true,
        "**/.svn": true,
        "**/.hg": true,
        "**/.DS_Store": true,
        "**/*.js": {
            "when": "$(basename).ts"
        },
        "**/*.js.map": true,
        "build/**": true,
        "docs/**": true,
        "print/**": true
    },
  2. For some reason, none of the JS files in the project are being suggested when I search for files (Ctrl + P). When I comment out the */.js rule, they start being suggested again.

Reproduces without extensions: Yes

jens1o commented 7 years ago

this is a feature, it is as-designed.

myfairsyer commented 7 years ago

this is a feature, it is as-designed.

@jens1o The docs say

This pattern will match on any JavaScript file (*/.js) but only if a sibling TypeScript file with the same name is present.

Did you maybe overlook this issue's title saying

$(basename).ts hiding JS files without associated TS files

or did I get sth wrong here?

(emphasises mine)

jens1o commented 7 years ago

Well, this requires more changes in the code than when not filtering it out.

This does not mean I don't like your suggestion, but there was a decision why they did that like they did.

massimocode commented 7 years ago

@jens1o This feature was working fine until recently. It's not a "suggestion".

will-l-h commented 7 years ago

I've run across this, too. I have used this feature since I started using Code over a year ago. The feature still works as the docs say in Code and only recently became broke in Insiders.

bpasero commented 7 years ago

I can reproduce. It seems the condition is not evaluated correctly from quick open. The result shows up fine in full text search though.

@roblourens this looks like a regression we should fix for recovery build.

roblourens commented 7 years ago

@mjbvz In the future, please assume that quickopen issues are search issues and assign them to me.