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

Cancel parsing event #941

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft

Cancel parsing event #941

wants to merge 18 commits into from

Conversation

rtetley
Copy link
Collaborator

@rtetley rtetley commented Nov 6, 2024

Trying another route from #937.
This time we use the SEL api to cancel events.
Currently does not seem to be working because of problem noted in gares/sel#10

@rtetley
Copy link
Collaborator Author

rtetley commented Nov 13, 2024

This is a big one, still WIP. Needs:

  • Recomputing the overview when after a new parse event
  • Fixing the mechanism for getting proof views -> should be handled in the doc manager

In order to interupt a full document parse, we first need to make it part of the event loop.
We introduce parse events for each line which will allow for
better interuptibility as well as laying the ground work for
blocking on parse errors.
This brings back performance to acceptable levels.
- Removed some commented out dead code
- Cleaned up ParseEvent (it doesnt need any info)
- Cleaned up the api (removed unecessary variables to init, reset, etc...)
- Removed cancel handle for ParseEvent
Now instead of launching execution directly from the lsp event,
we queue a new event that has less priority then parsing.
WIP: something fishy is still happening with the overview
The operations on range lists used to compute the overview could be re-used
somewhere else
This will allow to easily recompute the overview from an
invalidated state, and makes a correspondance between an
execution state and its overview.
This avoids two consecutive execution events happening at the same time and
messing up the state.
Additionally we move the parsing cancel handle to the document where
it belongs.
We will now put the proof view handling in the document manager.
Since ther return type for the handle event function is becoming
quite big, we turn it into a record.
Even in continuous mode, observe_id will now indicate where the user clicked.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant