You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use omnisharp with the helix editor and am experiencing a problem when loading my C# solution. I downloaded and installed the v1.39.11 net6.0 omnisharp build. Omnisharp starts up as expected when I open helix at the root of my solution. Sometimes things load fine and everything is great, but more often things break shortly after omnisharp starts loading the project.
When enabling verbose logging in helix, I see unexpected content in the messages from omnisharp. I think it's the name of the solution file. When that shows up within a message body, it causes json deserialization to fail here. I think helix handles this in a reasonable way, but afterwards omnisharp seems to be unresponsive.
Below is an example of what I'm seeing. There are almost always a few instances where the solution name string shows up in the middle of the file list in the o#/projectchanged message.
{
"jsonrpc":"2.0",
"method":"o#/projectchanged",
"params":{
"MsBuildProject":{
"ProjectGuid":"00000000-0000-0000-0000-000000000000",
"Path":"/Users/username/project-name/src/Project.Name/Project.Name.csproj",
"AssemblyName":"Project.Name",
"TargetPath":"/Users/username/project-name/src/Project.Name/bin/Debug/net7.0/Project.Name.dll",
"TargetFramework":".NETCoreApp,Version=v7.0",
"SourceFiles":[
// ... lots of files
"/Users/username/project-name/src/Project.Name/FileNaSolution.Name
Solution.Name
Solution.Name
me.cs","Users/username/project-name/src/Project.Name/AnotherFileName.cs",
// ... more files
],
"TargetFrameworks":[
{
"Name":".NETCoreApp",
"FriendlyName":".NETCoreApp",
"ShortName":"net7.0"
}
],
"OutputPath":"bin\\Debug/net7.0/",
"IntermediateOutputPath":"obj\\Debug/net7.0/",
"Configuration":"Debug",
"
// ... The json payload ends prematurely because helix is using the Content-Length header to determine how much data to read
Additionally, if I uncomment this line of code in helix, I see quite a few instances of the warning log which appears to indicate that the rogue string is appearing when a header is expected.
2024-01-10T15:32:46.048 helix_lsp::transport [WARN] Failed to parse header: "Solution.Name"
Does this seem like an omnisharp bug, or do you think there's an issue with how helix is interacting with omnisharp?
Thanks!
The text was updated successfully, but these errors were encountered:
I did a bit more digging in the helix code and it looks like it is closing its LSP server event listener thread when the json parse fails. When I change that to simply ignore the malformed message things seem fine from my perspective.
Still seems like the malformed json payloads may be a defect on the omnisharp side, so I'll leave this issue open.
System Details:
MacOS Sonoma
Helix 23.10
Omnisharp 1.39.11 net6.0 build
Overview:
I'm trying to use omnisharp with the helix editor and am experiencing a problem when loading my C# solution. I downloaded and installed the v1.39.11 net6.0 omnisharp build. Omnisharp starts up as expected when I open helix at the root of my solution. Sometimes things load fine and everything is great, but more often things break shortly after omnisharp starts loading the project.
When enabling verbose logging in helix, I see unexpected content in the messages from omnisharp. I think it's the name of the solution file. When that shows up within a message body, it causes json deserialization to fail here. I think helix handles this in a reasonable way, but afterwards omnisharp seems to be unresponsive.
Below is an example of what I'm seeing. There are almost always a few instances where the solution name string shows up in the middle of the file list in the
o#/projectchanged
message.Additionally, if I uncomment this line of code in helix, I see quite a few instances of the warning log which appears to indicate that the rogue string is appearing when a header is expected.
Does this seem like an omnisharp bug, or do you think there's an issue with how helix is interacting with omnisharp?
Thanks!
The text was updated successfully, but these errors were encountered: