forked from dafny-lang/dafny
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve a concurrency bug that could cause the IDE server not to send…
… updates for a particular version (dafny-lang#5299) ### Description - Resolve a concurrency bug that could cause the IDE server not to send updates. From the data I have, my theory is that this was caused by UpdateDocument setting `latestIdeState` with an updated version, as it should, but after that an old compilation would also set `latestIdeState` with an old version, and the new compilation would pick up this old version and keep using it. The notification publisher would then not send any updates because it would consider them to be for an old version. The old compilation being able to set `latestIdeState` when it should not was caused by a call to `observerSubscription.Dispose();` being done too late, and this PR resolves that. - Refactor UpdateDocument and StartNewCompilation so they are easier to read. ### How has this been tested? I don't know how to reproduce the issue, but this PR should greatly reduce the amount of random test failures <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
- Loading branch information
1 parent
5c8806f
commit 56a1652
Showing
4 changed files
with
53 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters