Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since I had a lot of failures using the language server, I found at least a very common denominator to (most) bugs: They happen when I trigger verification when another verification process is not finished.
But of course, if a previous verification process is canceled too early, it will get caught by try/catch in the parser and resolver. And if it's canceled late, it won't throw any TaskCanceledExceptions anywhere. Thus, these kinds of bugs require an "intermediate interrupting time", that was hard to find.
Hence, I created this test that does exactly this. On a (relatively slow to verify) example, I insert a typo, remove the typo and a failing assertion at the same time, and then reinsert the assertion.
I do so because our tests can loop indefinitely if diagnostics look like A B A and they are not awaited in A.
This is the test that was used to discover #2237
Fixing the language server means that this test should pass, even if we change
maxTests
to 20 instead of 5By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.