Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fleche] [controller] First steps towards resumption #76

Merged
merged 1 commit into from
Nov 20, 2022

Conversation

ejgallego
Copy link
Owner

@ejgallego ejgallego commented Nov 18, 2022

As of today, checking a document can only be preempted by another didChanges request. This is inconvenient when working in large documents, as we would like goals or hover to be able to interrupt it.

We add support in the controller for preempting checking by requests. The logic is that we keep a pointer for checking under progress, which is only set to None when the fleche notifies the checking has been completed. The queue manager will preempt checking for all requests, and the queue is empty, resume checking if pending.

As of this PR, resuming checking will re-check the document in full (with memoization of course); this is to be improved likely in a different PR, maybe after parsing memo?

Note that this interacts with other desired features such as lazy / viewrange checking, parsing memoization, and other features in non-trivial ways.

Fixes #70

@ejgallego ejgallego added this to the 0.1.0 milestone Nov 18, 2022
@ejgallego ejgallego force-pushed the queue_preempt branch 9 times, most recently from 19b40c0 to d9a7a01 Compare November 20, 2022 00:49
As of today, checking a document can only be preempted by another
`didChanges` request. This is inconvenient when working in large
documents, as we would like goals or hover to be able to interrupt it.

We add support in the controller for preempting checking by
requests. The logic is that we keep a pointer for checking under
progress, which is only set to `None` when the fleche notifies the
checking has been completed. The queue manager will preempt checking
for all requests, and the queue is empty, resume checking if pending.

As of this PR, resuming checking will re-check the document in
full (with memoization of course); this is to be improved likely in a
different PR, maybe after parsing memo?

Note that this interacts with other desired features such as lazy /
viewrange checking, parsing memoization, and other features in
non-trivial ways.

Fixes #70
@ejgallego ejgallego changed the title [fleche] [controller] First steps toward checking interruption / resumption [fleche] [controller] First steps towards resumption Nov 20, 2022
@ejgallego ejgallego merged commit 8f21430 into main Nov 20, 2022
@ejgallego ejgallego deleted the queue_preempt branch November 20, 2022 01:03
ejgallego added a commit to ejgallego/opam-repository that referenced this pull request Nov 20, 2022
CHANGES:

-----------------------

 - Location-aware cache for incremental Coq interpretation (@ejgallego)
 - Smart, structure-aware error recovery (@ejgallego)
 - Configure flags reading _CoqProject file (@artagnon, ejgallego/coq-lsp#3)
 - Interruption support (@ejgallego , @Alizter, ejgallego/coq-lsp#27, ejgallego/coq-lsp#32, ejgallego/coq-lsp#34)
 - Markdown support (@ejgallego, ejgallego/coq-lsp#62)
 - Goal display (@ejgallego @corwin-of-amber, ejgallego/coq-lsp#69)
 - User-side configuration (@ejgallego, ejgallego/coq-lsp#67)
 - Allow to configure before/after goal display (@ejgallego, ejgallego/coq-lsp#78)
 - Allow requests to interrupt checking (@ejgallego, ejgallego/coq-lsp#76)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[event queue] Preempt hover / goals events over checking
1 participant