If you have a DSL with a summarizer defined, it gets triggered on every save of the file. However, if the file save happens outside of VS Code (say git pull or someone using vim), the summary calculation is interrupted, but not triggered again. Hiding error messages.
To Reproduce
Steps to reproduce the behavior:
Define a LanguageService with a summarizer (make sure it takes a few seconds to run, it's easier to spot that way)
inside VS Code, trigger a save of a file, observe the summarizer running
Open the same file using vim, and change something and save it, while the summarizer is still running.
The summary calculation is stopped (the message about it is not visible at fixed DEBUG log level)
No new summary is calculated on the new changes.
Expected behavior
Summary to be calculated after the new file contents have been parsed.
Desktop (please complete the following information):
Context: VS Code extension
Rascal Version: rascal-vscode 0.10.2
Additional context
What is happening? The rascal-lsp gets 2 events, "change" and "save". The change events contains the new contents of a file (that might or might not be saved to disk) and the "save" event that is triggered when a user inside VS Code presses save.
Now the problem is, changes from outside of VS Code do generate a "change" event. but not a "save" event. The code in rascal-lsp wrongfully assumed this relationship between these two events.
Describe the bug
If you have a DSL with a
summarizer
defined, it gets triggered on every save of the file. However, if the file save happens outside of VS Code (say git pull or someone using vim), the summary calculation is interrupted, but not triggered again. Hiding error messages.To Reproduce
Steps to reproduce the behavior:
Expected behavior Summary to be calculated after the new file contents have been parsed.
Desktop (please complete the following information):
Additional context
What is happening? The rascal-lsp gets 2 events, "change" and "save". The change events contains the new contents of a file (that might or might not be saved to disk) and the "save" event that is triggered when a user inside VS Code presses save.
Now the problem is, changes from outside of VS Code do generate a "change" event. but not a "save" event. The code in rascal-lsp wrongfully assumed this relationship between these two events.
Thanks @sungshik for diagnosing this issue.