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

Do not crash on re-registration #1107

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

mickaelistria
Copy link
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
Contributor Author

@akurtakov Can you confirm this would help aCute?

@akurtakov
Copy link
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
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
Contributor Author

Failures are not related, let's merge.

@mickaelistria mickaelistria merged commit 0dd453f into eclipse:main Sep 17, 2024
5 of 6 checks passed
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