Date: Tue, 25 Jan 2022 10:58:51 +0200
Cc: p.stephani2@gmail.com, alan@idiocy.org, mituharu@math.s.chiba-u.ac.jp
From: Saulius Menkevicius <sauliusmenkevicius@fastmail.com>
Sorry I did not mention the platform, this happens on Linux/x64 and has
been reported by multiple persons:
- https://github.com/razzmatazz/csharp-language-server/issues/12
The issue has been noticed when dotnet-based LSP servers are used with
emacs/lsp-mode, -- in particular lsp-mode starts the server using
`make-process` and then communicates over stdio. Link to the code that
launches the server:
- https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-mode.el#L6925
We have csharp-ls and fsac servers launched with the same mechanism as
are for other languages -- which are working ok with posix_spawn
enabled. It only breaks for those before-mentioned LSP servers that are
implemented on top of dotnet and use dotnet runtime (same thing as JVM,
but for C#/F#/CLR languages).
Now it appears, that switch to posix_spawn broke communication over
stdio to those dotnet-based LSP servers for some technical reason, -- I
didn't investigate yet why, because it is a bit over my head. I *think*
there is an interplay between posix_spawn-based process launch
implementation in emacs and dotnet runtime stdio abstractions/platform
layer -- because otherwise other language servers work with that commit
that enables posix_spawn, like those based on JVM too.