purescript-language-server
purescript-language-server copied to clipboard
Retries when restarting ide server.
@nwolverson
Can you explain the reason for these retries?
https://github.com/nwolverson/purescript-language-server/blob/ceee3d5ff4cb5beb62a134088502523bc8afb73c/src/LanguageServer/IdePurescript/Main.purs#L280
I see now it tries to to reapeat the command on the start if server happens to be not ready just ater start. I happen to get often errors that lead to losing connections to the server when starting IDE (sometimes rarelly during the work), seem due to that is that if connection is lost during the command executing is it thrown. https://github.com/nwolverson/purescript-language-server/blob/ceee3d5ff4cb5beb62a134088502523bc8afb73c/src/IdePurescript/Build.purs#L170
Anyway, going to refactor it a bit.
Yes, it turns out that for some people the server starts really slowly, I think that's part of the explanation for how this ended up
I encountered an interesting issue, two instances running in different folders generated the same port for purs-ide, the second instance didn't start in this case (as it found running purs-ide with incorrect path on the port, ans says to correct it manually). I believe in this case it is quite safe to start server on another port. Also port availability (after request to ide) should be checked with other methods.