-
Notifications
You must be signed in to change notification settings - Fork 767
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
Upgrade OmniSharp #1656
Comments
We can't. #1631 Omnisharp is broken and they have no interest in fixing it as far as we can tell. |
But basically, unless you or another community member send a PR that updates this and all the tests pass, I feel like we're stuck. I don't use c# so I have no impetus to do it. @mispencer has in the past contributed a lot, and we're very thankful for their contributions. If using the LSP interface works then great you should be able to do that. Last time we checked it lacked features vs the API we currently use. But I haven't bothered looking at it either, nor do I plan to. So in summary:
|
I created a fork of Omnisharp that supports .NET 6 earlier that I personally use, but it is a ugly hack. However, it doesn't appear that the Omnisharp maintainers will fix this issue. I will attempt to fix it properly myself when I have time. |
If you remember, what features did it lack? |
I created a PR on the Omnisharp repo to resolve the blocking issue: OmniSharp/omnisharp-roslyn#2446 |
Is this supposed to fix the issue entirely? I pulled your omnisharp version and built it, however I still get exceptions thrown when trying to use it in a C# project. |
It works in my testing. Are you using the new executable in ymcd? Steps to using this Omnisharp fork:
|
What I did was the following:
diff --git a/ycmd/completers/cs/cs_completer.py b/ycmd/completers/cs/cs_completer.py
index bb754498..b1a1db21 100644
--- a/ycmd/completers/cs/cs_completer.py
+++ b/ycmd/completers/cs/cs_completer.py
@@ -349,7 +349,7 @@ class CsharpCompleter( Completer ):
omnisharp_server = responses.DebugInfoServer(
name = 'OmniSharp',
handle = completer._omnisharp_phandle,
- executable = PATH_TO_ROSLYN_OMNISHARP,
+ executable = self._roslyn_path,
address = 'localhost',
port = completer._omnisharp_port,
logfiles = [ completer._filename_stdout, completer._filename_stderr ],
@@ -431,7 +431,7 @@ class CsharpSolutionCompleter( object ):
self._ChooseOmnisharpPort()
- command = [ PATH_TO_OMNISHARP_ROSLYN_BINARY,
+ command = [ self._roslyn_path,
'-p',
str( self._omnisharp_port ),
'-s',
I will try using |
Building a dotnet version from your fork makes it load, but fails with a different exception:
If it matters, I changed the .NET version to Edit: This can be reproduced on my machine simply by creating a console project and adding it to a new sln. Opening |
Ok, deleting If they won't merge it, I think we should look into using the LSP frontend of OmniSharp. |
Please upgrade OmniSharp to the latest version for .NET6 support.
I have tried simply upgrading to the latest OmniSharp, but that ended up giving me a whole lot of exceptions whenever I actually tried to write code. I think some of the API changed in how you communicate with the server, I haven't really bothered to investigate that deep.
Looking at some old issues it seems that the LSP implementation of OmniSharp was rather shoddy, but perhaps that could be revisited as manually adding the latest STDIO version using
g:ycm_language_server
seems to work at a cursory glance.There is also a dotnet core version of it now, which may perhaps be a better choice for those who want to use the latest .NET versions and experiment with preview releases.
The text was updated successfully, but these errors were encountered: