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

GLSP-1240: Ensure compatibility with >= Theia 1.44 #196

Merged
merged 4 commits into from
Feb 9, 2024
Merged

Conversation

tortmayr
Copy link
Contributor

@tortmayr tortmayr commented Feb 6, 2024

Fix API breaks introduced with Theia 1.44.
Update Theia Version Compatibility section in README.md.
Note that mentioned 2.1.0-theia1.44.0 version is not released yet.
I will do so once this change is approved.

Copy link
Member

@CamilleLetavernier CamilleLetavernier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I used this for #197 and it worked fine.

Note: I didn't do extensive testing of the entire GLSP stack, so another review is still welcome!

Copy link
Contributor

@ndoschek ndoschek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM too 👍

@martin-fleck-at martin-fleck-at removed their request for review February 8, 2024 10:39
@tortmayr tortmayr merged commit c8cd5cd into master Feb 9, 2024
5 checks passed
@tortmayr tortmayr deleted the theia-fix branch February 9, 2024 08:08
tortmayr added a commit that referenced this pull request Feb 9, 2024
 GLSP-1240: Ensure compatibility with >= Theia 1.45
@tortmayr
Copy link
Contributor Author

In general the change seems to work great and interrupt/reconnect works for the most cases.
However, there seems to be an issue if the server sends actions/updates while the frontend is disconnected.
Those actions just get lost and never reach the frontend client.

I tested this by updating the server to send a MessageAction with an incremented counter each second.
If I disconnect the frontend for 10 seconds those intermediate message updates get lost:
image

This becomes more of an issue if the frontend disconnects while a RequestAction or any other promise that needs a server action to resolve is dispatched. E.g. if the frontend disconnects during model loading and reconnects afterwards the model is never loaded.

Theia has supports buffering of messages (see https://github.com/eclipse-theia/theia/blob/3034c0a0b4dd1082589ee5ec78a066a8532705fa/packages/core/src/node/messaging/websocket-frontend-connection-service.ts#L129) while the socket is disconnected so I think some special handling is required on our side to properly forward those messages to the glsp client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants