Closed halftan closed 6 years ago
Does this PR solve the orphan server processes problem? That's the thing preventing me from using this plugin!
@iovis9 yes. It's stated as 'stale solargraph server process'. The problem is resolved by adding a __del__
method to the Source
class which just calls server.stop()
to kill the server process.
The original intent to kill server processes is implemented by capturing and responding to a SIGTERM
signal (see here), which is not feasible due to the async plugin architecture used by neovim/deoplete, the signal simply won't be sent to the python process that holds our deoplete source class. I guess we can use neovim's job control mechanism but it's more complicated to implement so I just used the destructor method.
Thank you for sending PR! Sorry for the late review.
It tried the same solution before, but it did not solve it in my environment.
Python does not guarantee to call __del__
when the interpreter exits.
In my environment the following PR solved the problem.
https://github.com/uplus/solargraph-utils.py/pull/2
Please pip install --upgrade solargraph-utils.py
.
Would it still make sense to consolidate the python code into the plugin? I'd love it if it didn't need an external dependency!
This PR contains multiple fix. I do not want to merge it. Please split and send PR individually.
Issue made about external package dependency.