Skip to content

Do not crash on re-registration - #1107

Merged
mickaelistria merged 1 commit into
eclipse-lsp4e:mainfrom
mickaelistria:log-reregister
Sep 17, 2024
Merged

Do not crash on re-registration#1107
mickaelistria merged 1 commit into
eclipse-lsp4e:mainfrom
mickaelistria:log-reregister

Conversation

@mickaelistria

Copy link
Copy Markdown
Contributor

Some language servers such as OmniSharp may (erroneously but not fatally) re-register the same capability multiple times. Instead of crashing in such case, just log.

Some language servers such as OmniSharp may (erroneously but not
fatally) re-register the same capability multiple times.
Instead of crashing in such case, just log.
@mickaelistria

Copy link
Copy Markdown
Contributor Author

@akurtakov Can you confirm this would help aCute?

@akurtakov

Copy link
Copy Markdown
Contributor

I know see:

!ENTRY org.eclipse.lsp4e 2 0 2024-09-17 14:06:39.120
!MESSAGE A registration with id 49a06df1-0048-4f91-9cb3-e55ca8781e46 already exists. Unregistering may not fully work in this case.


!ENTRY org.eclipse.lsp4e 2 0 2024-09-17 14:06:39.121
!MESSAGE A registration with id f113b054-d549-442a-af7d-2faceaf5831e already exists. Unregistering may not fully work in this case.


!ENTRY org.eclipse.lsp4e 2 0 2024-09-17 14:06:39.122
!MESSAGE A registration with id 2c1bfa22-1b23-4382-8d3e-e1216cc0dbc3 already exists. Unregistering may not fully work in this case.


!ENTRY org.eclipse.lsp4e 2 0 2024-09-17 14:06:39.123
!MESSAGE A registration with id b4a7234e-b299-491a-b349-b827c4bc9b0b already exists. Unregistering may not fully work in this case.

Unfortunately, Omnisharp is not working with it too. If you believe it's the proper thing to do please merge. I'll have to fight more with Omnisharp to figure what is going on.

@angelozerr

Copy link
Copy Markdown
Contributor

I had a similar problem with LSP4IJ and you need to store in a map the registration id because I had a case with a ls which registers 2 fileWatchers and unregister the last.

In this case you need to keep the first and remove the second.

@mickaelistria

Copy link
Copy Markdown
Contributor Author

Failures are not related, let's merge.

@mickaelistria
mickaelistria merged commit 0dd453f into eclipse-lsp4e:main Sep 17, 2024
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.

3 participants