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

"Problems" not removed for closed TS file when file is closed #101885

Closed
kimadeline opened this issue Jul 7, 2020 · 0 comments · Fixed by #157117
Closed

"Problems" not removed for closed TS file when file is closed #101885

kimadeline opened this issue Jul 7, 2020 · 0 comments · Fixed by #157117
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders javascript JavaScript support issues typescript Typescript support issues verified Verification succeeded
Milestone

Comments

@kimadeline
Copy link

Issue Type: Bug

Moved off #100646

Steps to reproduce:

  1. Add code that generates a linting warning (in this case, const foo = "one"; should should generate an unused variable warning)
  2. Open the file, and then close it before the diagnostics appear

Expected behavior:

Diagnostics are not shown when the file is closed.

Actual behavior:

Diagnostics are sometimes shown when the file is closed, and will not disappear until I reload the window.

⚠️ Please note that I couldn't reproduce this behaviour reliably.

Action gif:

problems_view_001

VS Code version: Code 1.46.1 (cd9ea64, 2020-06-17T21:17:14.222Z)
OS version: Darwin x64 19.5.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz (12 x 2600)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) 1, 1, 1
Memory (System) 16.00GB (1.76GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (15)
Extension Author (truncated) Version
bracket-pair-colorizer-2 Coe 0.2.0
gitlens eam 10.2.2
prettier-vscode esb 5.1.3
vscode-pull-request-github Git 0.17.0
vscode-docker ms- 1.3.1
python ms- 2020.6.91350
vscode-pylance ms- 2020.6.1
remote-containers ms- 0.122.1
remote-ssh ms- 0.51.0
remote-ssh-edit ms- 0.51.0
remote-wsl ms- 0.44.4
vscode-remote-extensionpack ms- 0.20.0
azure-account ms- 0.8.11
vscode-typescript-tslint-plugin ms- 1.2.3
vscode-icons vsc 10.1.1

(3 theme extensions excluded)

@mjbvz mjbvz self-assigned this Jul 7, 2020
@mjbvz mjbvz added bug Issue identified by VS Code Team member as probable bug typescript Typescript support issues labels Nov 3, 2020
@mjbvz mjbvz added this to the Backlog milestone Oct 20, 2021
@mjbvz mjbvz added the javascript JavaScript support issues label Oct 20, 2021
mjbvz added a commit that referenced this issue Oct 20, 2021
To handle JS/TS diagnostics, we currently use the language mode of an open text document. This should always be correct, but also causes us to open text documents that we don't need to

This change instead tries using the file extension first before falling back to use the text document. Using the file extension is not strictly correct since users can setup weird file associations, but should be ok for the vast majority of use cases

Investigated as part of #101885
@mjbvz mjbvz modified the milestones: Backlog, August 2022 Aug 4, 2022
@VSCodeTriageBot VSCodeTriageBot added the unreleased Patch has not yet been released in VS Code Insiders label Aug 4, 2022
dabreadman pushed a commit to THIS-IS-NOT-A-BACKUP/vscode that referenced this issue Aug 4, 2022
…7117)

Fixes microsoft#101885

We currently only want to report diagnostics for opened JS/TS files
@VSCodeTriageBot VSCodeTriageBot added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Aug 5, 2022
joyceerhl pushed a commit that referenced this issue Aug 10, 2022
Fixes #101885

We currently only want to report diagnostics for opened JS/TS files
@meganrogge meganrogge added the verified Verification succeeded label Aug 24, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Sep 18, 2022
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 insiders-released Patch has been released in VS Code Insiders javascript JavaScript support issues typescript Typescript support issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants