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

"The server process has timed out" upon opening VS Code with a Dhall file open #18

Open
SiriusStarr opened this issue Dec 22, 2019 · 1 comment

Comments

@SiriusStarr
Copy link

SiriusStarr commented Dec 22, 2019

If I open VS Code (from the program being closed), switch to a new workspace, reload the window, etc. (i.e. do anything that loads extensions) with a Dhall file as the open tab, the extension fails to load with the message The server process has timed out. In order to then actually have the language server functional, one has to do any of the above things (close and reopen, reload the window, etc.) with a non-Dhall file as the open tab (or nothing open).

If VS Code loads fully without trying to activate the extension, opening any Dhall file causes it to load just fine and work normally.

This may be more a VS Code issue (slow extension loading?) than something actually wrong with this extension, but it's extremely annoying, since one tends to have a Dhall file open when switching back to a project.

No relevant messages of any kind that I can find, but if someone has suggestions for how to generate a more useful debugging message, I am all ears. The only messages I can find whatsoever are the normal extension host loading messages, i.e.

[2019-12-22 14:59:07.172] [exthost] [info] ExtensionService#_doActivateExtension panaeon.vscode-dhall-lsp-server {"startup":false,"extensionId":{"value":"panaeon.vscode-dhall-lsp-server","_lower":"panaeon.vscode-dhall-lsp-server"},"activationEvent":"onLanguage:dhall"}
[2019-12-22 14:59:07.172] [exthost] [info] ExtensionService#loadCommonJSModule file:///home/user/.vscode/extensions/panaeon.vscode-dhall-lsp-server-0.0.4/out/extension.js

(It should be noted that this occurs for me regardless of the Dhall file in question. Very simple or very complex, valid or invalid, any file that causes the extension to activate will cause this to occur.)

@arobertn
Copy link

The issue traces down to the obtainExecutableStatus() function in extension.ts. There are hardcoded 2- and 1-second timeouts. Aside from the 2 never being able to have any effect with the 1 there, it would be best if these were configurable or at least higher (say, 10-15 seconds) since entering a dhall file while VS Code is starting up can cause quite a delay.

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

No branches or pull requests

2 participants