-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic support for cancellation of resolution (#4175)
### Changes - Add support for cancelling resolution work at module granularity. Before this PR, the language server would always finish it's currently running resolution job before starting resolution on the most recent changes, skipping resolution work of obsolete changes that was not yet started. With this PR, the language server can also stop it's current resolution work at the module boundaries. - Add a telemetry publication that says how much time was spent on resolution ### Testing I see improved behavior on large Dafny codebases with this change. The IDE generally becomes more responsive, switching away from 'Resolving...' into other states faster. Given that from a user perspective the resolution process is black box, there's no contract for when in that process cancellation should be supported. I think the right way to test this is to have a codebase that takes a long time to resolve, and to test that changes will always cancel the current resolution within a time smaller than X. However, making such a test is time consuming and I would like to deliver this fix to users already, so I'm not adding such a test yet. I also haven't added a test for the telemetry change but that is not a user facing change. <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
eb69edb
commit 8f1311c
Showing
9 changed files
with
65 additions
and
34 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Improve the responsiveness of the Dafny language server when making changes while it is in the 'Resolving...' state. |