git compare leaves problem window open
Expected: No linting to happen at all in these windows, OR problems go away when closed.
Steps to reproduce [reproduces on both windows and linux] Open a project with a git repo
Right click on a file and compare with previous revision


Extensions used Git Lens, vscode-lua, keyring.lua
Related #32
I've taken a look at what APIs are available to me to detect if a document is a part of a diff window, and have come up short, unfortunately.
When vscode performs a diff, it does so with the showModifications URI scheme on the files, which lets the ext filter them out. Git Lens seems to use the built in diff command in vscode, but this just seems to report to the language server that two files were open with no indication that they're being used in a diff window (other than the fact that both files are in the TEMP directory).
I was somewhat puzzled by this, but confirmed that even the TypeScript language server has this same issue.
As for the problems remaining even after the window is closed, this seems to be because the onClose event is only fired for one of the files in the diff window, while two sets of onOpen and onChange events are fired. Maybe this is a bug in vscode's language client?
Would it be possible if the file is opened inside a temp folder to not lint at all? Possibly as something like a workaround option?
Also another related bug. deleting a file that is opened leaves the problem window open for that file if there was problems in the file.
On Feb 4, 2018 3:22 PM, "Cam" [email protected] wrote:
I've taken a look at what APIs are available to me to detect if a document is a part of a diff window, and have come up short, unfortunately.
When vscode performs a diff, it does so with the showModifications URI scheme on the files, which lets the ext filter them out. Git Lens seems to use the built in diff command in vscode, but this just seems to report to the language server that two files were open with no indication that they're being used in a diff window (other than the fact that both files are in the TEMP directory).
I was somewhat puzzled by this, but confirmed that even the TypeScript language server has this same issue.
As for the problems remaining even after the window is closed, this seems to be because the onClose event is only fired for one of the files in the diff window, while two sets of onOpen and onChange events are fired. Maybe this is a bug in vscode's language client?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/trixnz/vscode-lua/issues/39#issuecomment-362936428, or mute the thread https://github.com/notifications/unsubscribe-auth/ANUy4NwZgETvjTyZrCQpLrB93ECYJVm4ks5tRhGjgaJpZM4Rv5Ek .
We could definitely ignore files in the temp directory as a workaround, as much as I dislike it 😛. As for deleting files, have you tried with version 0.10.1? I couldn't replicate the behaviour.
I will double check tonight. I think it might be OS specific. I just can't remember which OS
On Feb 5, 2018 1:18 PM, "Cam" [email protected] wrote:
We could definitely ignore files in the temp directory as a workaround, as much as I dislike it 😛. As for deleting files, have you tried with version 0.10.1? I couldn't replicate the behaviour.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/trixnz/vscode-lua/issues/39#issuecomment-363172868, or mute the thread https://github.com/notifications/unsubscribe-auth/ANUy4A4Y9fpQJub5QIpTb7cFfYcpix_1ks5tR0X-gaJpZM4Rv5Ek .
For ignoring in temp having a setting to toggle it would be a decent work around for the workaround for people that don't want the workaround.
On Feb 5, 2018 1:18 PM, "Cam" [email protected] wrote:
We could definitely ignore files in the temp directory as a workaround, as much as I dislike it 😛. As for deleting files, have you tried with version 0.10.1? I couldn't replicate the behaviour.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/trixnz/vscode-lua/issues/39#issuecomment-363172868, or mute the thread https://github.com/notifications/unsubscribe-auth/ANUy4A4Y9fpQJub5QIpTb7cFfYcpix_1ks5tR0X-gaJpZM4Rv5Ek .
@trixnz I think ignoring files that start with Cache- and are in the Temp folder is a good workaround, even though this should probably reported as a problem upstream? What exactly would you need from them to make this better?
Also can confirm that the second part of this issue, the files not disappearing from the problems pane when they are closed, is fixed in at least 0.12.4 which I just tested.