-
Notifications
You must be signed in to change notification settings - Fork 413
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
jdtls python script forks on Windows #2615
Comments
@jreicher , other than simplicity, what's the reason for terminating the python script and re-parenting JDT-LS under the process that launched the script ? |
FWIW, I can confirm that using |
CC: @schrieveslaach for comment as well. Looking into the history, we went from The proposal here is to go back to I would think the client that launches the python script has probably set up communication with the LS, so it should create some API to report the state of the LS back to other extensions that might need that info, but for now I'm definitely open to |
Maybe a good compromise would be to only use |
To be honest I assumed execvp would behave "in the usual manner" on Windows, potentially making subprocess control more robust by removing the python process as an intermediary in process status and signal passing But the fact it spawns a new process defeats this purpose (and seems quite ridiculous to me) A bit of googling suggests I'm not the only one surprised by this and that using subprocess.run() is a fairly common compromise |
I'm interested in taking a look at this! |
Hi, first of all thanks for this language server! It makes writing Java code on lightweight editors like Vim way less painful :)
The
jdtls.py
script is currently unusable in certain scenarios on Windows sinceos.execvp
forks and runs the server in a child proces, and terminates the python interpreter. Plugins watching thepython3 jdtls
process see that the process is exited, and report that the language server has exited too, while it's still running as a child process. This is the case for the vim9 LSP plugin, for example; see this issue: yegappan/lsp#285Wouldn't it be possible to move most of the logic into the java program itself? This would make using the plugin in such situations way easier.
Thanks!
The text was updated successfully, but these errors were encountered: