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

Improve error handling for the language server #31

Merged
merged 4 commits into from
Dec 20, 2023

Conversation

thedemons
Copy link
Contributor

Summary:

  • Refactor and rename variables in LanguageServer to follow the standard naming convention.
  • In case of a failure in downloading the language server, a notification will be displayed prompting the user to retry.
  • Before starting the language server executable, verify its digital signature. If found to be invalid, the user will be asked whether they wish to re-download it or proceed regardless. This will handle any errors during the archive extraction process.
  • If the language server process fails to start due to any reason, the user will be notified and given an option to re-download.
  • If Process.BeginErrorReadLine fails, fall back to reading the port file from the manager directory.
  • The OpenInBrowserSafe() method has been made static, it's tempting to move it out of the CodeiumVSPackage class but I didn't want to make so many changes.
  • Previously, if we showed a notification using NotificationInfoBar too early, before the main window was initialized, it would fail. It will now delay and wait until the main window is opened.

Apologies for the extensive changes in this pull request, it might be scary to modify what's already working on a crucial component like this. However, I have done some extensive tests to make sure that this will not break under abusive conditions.

@fortenforge
Copy link
Collaborator

Sorry for the impending merge conflicts. With any luck you should be able to run clang format with the config first and the merge should be relatively straightforward

@fortenforge fortenforge merged commit c86b277 into Exafunction:main Dec 20, 2023
1 check passed
@thedemons thedemons deleted the lsp-download-err-handling branch December 20, 2023 02:10
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.

2 participants