enso-org / enso

Hybrid visual and textual functional programming.
https://enso.org
Apache License 2.0
7.34k stars 320 forks source link

Reconnecting with the engine #5202

Closed wdanilo closed 1 month ago

wdanilo commented 1 year ago

What IDE should do:

  1. Once we lose the connection with LS, try to reconnect.
  2. When reconnected, is should reinitialize the protocol, restore all execution contexts and visualizations, and synchronize the code

This task is automatically imported from the old Task Issue Board and it was originally created by Adam Obuchowicz. Original issue is here.


Why

As Enso IDE user I want to IDE try to reconnect to the Language Server if the connection is lost So that I can continue working once the LS is restored.

Discussion

https://discord.com/channels/401396655599124480/1050713090829852712

Acceptance Criteria

Scenario: 
Given IDE with already open project
When language server is closed or otherwise connection is lost
Then IDE should attempt to reconnect to the language server and reinitialize the session

Notes:

### GUI Tasks
- [ ] https://github.com/enso-org/enso/issues/8520
- [ ] https://github.com/enso-org/enso/issues/8522
- [ ] https://github.com/enso-org/enso/issues/8523
Frizi commented 1 year ago

TL;DR from discord:

step by step reproduction scenario by @hubertp:

  1. start gui
  2. start backend (or rather project-manager) separately
  3. enter any project and let it boot
  4. kill backend (that includes project-manager and LS of the project)
  5. let IDE cook for a while until it notices the problem and provides a warning
  6. start backend again

ide side task description by @farmaazon:

on the IDE side, we would need to do the following:

  1. once the we lose connection with LS, try to reconnect.
  2. When reconnected, we should reinitialise the protocol, restore all execution contexts and visualisations, and synchronise the code
hubertp commented 1 year ago

Doc on the current state of reconnections https://docs.google.com/document/d/1yah7vK9NDt9l15XOXNak37hMugPFmxUsoezrnsyUEU4/edit?usp=sharing

Google Docs: Sign-in
Access Google Docs with a personal Google account or Google Workspace account (for business use).
enso-bot[bot] commented 1 year ago

Hubert Plociniczak reports a new STANDUP for yesterday (2023-03-09):

Progress: Investigating the current behaviour when Language Server restarts. Created doc as a summary for areas to explore. Also investigated where we spend all this time during bootstrapping. Created 5875, 5881 and 5882 (the last two with Jaroslav's help) as potential follow ups. It should be finished by 2023-03-13.

Next Day: Next day I will be working on the #5749 task. Eliminate GraalVM updater retries, investigate reported visualization problems.

jdunkerley commented 9 months ago

@hubertp to review state against GUI2. Need to ensure Windows Hibernation/Standby support works.

farmaazon commented 9 months ago

As I know, GUI2 does not take any action to reconnect with Language Server. Created subtasks to implement it.