Closed muojp closed 6 years ago
Hmm, it seems to be working fine for me. But my local vscode is 1.25.1 on Ubuntu (and vscode-language-review is 0.4.5), so it might be dependent on environment and/or versions. Or the operation was not exactly the same. I didn't try to save it. I will try 1.26.1 once I get good network connection.
Thanks for your quick checking. I tested on other Windows box (1.26.1+0.4.5) and got the same issue, and will test macOS later. I also confirmed the problem also occurs on redpen-enabled directory (I originally found the issue on untethered file).
Update: I confirmed the same weird behavior on vscode 1.26.1's on macOS (forgot version) & Ubuntu 18.04.1.
Yes, I could reproduce it with vscode 1.26.1. Looks like regression in VSCode.
@atsushieno The problem is that you are always creating a new diagnostics collection without disposing the old one. See https://github.com/atsushieno/vscode-language-review/blob/90639541664bdab6ba8cb0b2c91853bf577dd6bf/src/preview.ts#L130. We have fixed a bug in VS Code that wouldn't show those duplicated collections and now after us fixing it, issues like this can surface.
@jrieken you're right, thanks a lot for the hint!
I found a weird behavior about syntax checking (vscode 1.26.1 on Windows 10 + vscode-language-review 0.4.5).
Abstract
The extension keeps reporting syntax errors after you fix the problem. Furthermore, the errors persist after closing tab -> reopening the file unless you completely close the host editor window and reopen it.
Repro
Here's a simple repro:
Step 1: type in a tiny doc and save it to a file
Step 2: make the doc corrupt
Screenshot 1:
Syntax checker performs as expected and reports error as red underlines (note: but I don't get why it says there are duplicated labels).
Step 3: fix the doc
Expected: Error vanishes Actual: Error persists like below
Screenshot 2:
(bonus) Step 4: close the tab and reopen the file
Error persists (same as the Screenshot 2).