omnisharp-roslyn
omnisharp-roslyn copied to clipboard
language server completely ignoring stdin
I'm trying to build and run omnisharp with emacs in docker. I'm quite new to dotnet on linux so I'm kinda lost about a lot of things but for some reason omnisharp is completely ignoring stdin when running with -lsp, meaning my language server client is crashing because the server is totally unresponsive.
Here's the Dockerfile I have so far which builds omnisharp and then installs it to /omnisharp/OmniSharp.
FROM mcr.microsoft.com/dotnet/sdk:6.0
RUN apt-get update \
&& apt-get install -y mono-runtime binutils curl mono-devel ca-certificates-mono nuget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/*
# Step to install the roslyn language server to /bin/omnisharp
RUN git clone --recurse-submodules --single-branch https://github.com/OmniSharp/omnisharp-roslyn.git /omnisharp/repo \
&& cd /omnisharp/repo \
&& ./build.sh --target PublishNet6Builds --configuration Release \
&& mv -v artifacts/publish/OmniSharp.Stdio.Driver/linux-x64/net6.0/* /omnisharp/ \
&& rm -rvf /omnisharp/repo \
&& ln -sv /omnisharp/OmniSharp /bin/omnisharp
If I run just omnisharp I get a bunch of informative debug output. If I run omnisharp -v -lsp I get dead silence. If I enter anything or even send EOF with Ctrl-d I still get nothing. Ludicrously I can even do omnisharp -v -lsp </dev/random meaning even if the server is recieving a massive stream of random input it's just completely disregarding it.
Does anyone know how to get this working as advertised?
Update: I've somehow managed to run the language server succesfully through an alternative docker image. Basically source from docker-yay, run yay -Sy omnisharp-roslyn-bin and use from my editor. I have no idea why that works but this doesn't. I guess because it's likely installing an older omnisharp release. Will experiment more.
I've have the same issue when I try to use OmniSharp with intellij-lsp (an IntelliJ extension for support of LSP).
I've found that the version 1.32.9 work with stdin/out using --languageserver option, but not recent versions.
At least this versions don't work:
1.37.15+Branch.tags-v1.37.15.Sha.1ff2a19dce6012a4fe90904de239f3b82682b4441.37.5+Branch.tags-v1.37.5.Sha.bb5744356437c8c2dbaa63d8f092aa98b7b492bc1.37.2+Branch.tags-v1.37.2.Sha.df9d4fcebe0729760c5988ec9fa499c092e5dcb81.36.0+Branch.tags-v1.36.0.Sha.ad4f3ca6fd2ceef49f3a65248356c5d9027d20571.34.0+Branch.master.Sha.79db05e574a95b541e828a1af33382eb6024933a1.32.6+Branch.master.Sha.69c9127142e6430cef1288580d5e3bb6a24b4669