-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR: Kill LSP transport layer if Spyder gets killed #10111
Conversation
I have two questions for you:
|
Right now, we will kill it only if It is stdio. When the equivalent PR on pyls gets merged, then It Will also kill TCP servers |
The mechanism works like a cascade, Spyder kills the transport process, which in turn, kills pyls. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andfoy, I left a small review for you, otherwise looks good.
@dalthviz, please try this PR on Windows by forcefully killing Spyder and verifying that both our transport layer and the |
Will check on OSX |
@ccordoba12 it works for me, after killing Spyder with the task manager or |
On OSX but
Do I need to use the dev version of PYLS @andfoy ? |
This depends on palantir/python-language-server#642 |
Ok, then this is good to go :-) |
Needs a new release of PyLS
Sorry guys, I forgot this depends on a new release of the PyLS. I'm going to do one right now. |
@ccordoba12 This requires the latest release of pyls on our Anaconda channel |
Yes, sorry about that. I just moved 0.28.3 to our channel. Please do a |
6b26071
to
aee5db8
Compare
Ok @ccordoba12 will check now |
@ccordoba12 I am seeing
|
We need to check this on windows |
@andfoy, please merge this one with master to fix the merge conflict. |
…kill_transport_layer Merge!
@ccordoba12 @goanpeca You need me to help test on Windows? I have a major deadline on a project tomorrow morning but I can do it after that if you haven't already. |
Sure, that would be really appreciated! But first we need to solve the problems we have at the moment with the PyLS (see palantir/python-language-server#682). I'll let you know when that's sorted out. |
Sure, I'll await your instructions; thanks for letting me know. Hope you can get the Jedi issue resolved soon. |
@CAM-Gerlach, this is ready for you to test it. For that you need to update to |
@ccordoba12 Killing the Spyder main process from process explorer does now result in the transport client getting killed immediately and automatically, but the pyls server, the jedi subprocess it launches and the two Also, I would like to test what happens if there is first a problem with the client or the server that triggers the crash in the first place; most of the crashes and hangs I experience regularly seem to be associated with PyLS or LSP has stopped working first. For example, just had two hangs and a crash today, and they either shortly or immediately followed LSP stopping responding. I'll keep running under this build and see if I get one of said crashes, though they never show up when I want them to. |
This avoids to make a new PyLS release to test every feature we want to add on Spyder that depends on it.
@CAM-Gerlach, I think I fixed the errors on Windows in palantir/python-language-server#684 I uploaded a new PyLS version to our channel (0.29.3), so please update to it and let us know if it fixes the problem for you. |
@ccordoba12 Yep, updated and it works great! Also, I tested completion, help etc. just to be sure and that all works too. Thanks! |
Great, thanks for the confirmation! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @andfoy for this!
Description of Changes
This PR adds a periodical check for the parent process of the LSP transport layers. This PR, alongside palantir/python-language-server#642 will prevent the existence of zombie process if Spyder crashes unexpectedly
Issue(s) Resolved
Fixes #
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.
I certify the above statement is true and correct:
@andfoy