Open mrakgr opened 4 years ago
Since I have the opportunity, let me ask some extra questions. My main interest in this plugin is to use it as a template for my Spiral language so I've been studying it for the past few days. As somebody who went through this, do you have any advice for how to approach this?
Besides the build issues I've been running into not just for this plugin, but also with VS Code, my low experience with webdev has been a problem. Also after studying it, I think that this F# plugin is too complex to serve as a template. The VS Code LSP samples on the other hand are far too simplistic. This plugin seemed like a natural place to start as Spiral is written in F#, but it might be better for me to study a plugin for a simpler language like C maybe.
The plan on how to do a language plugin might be simple on the surface - set up two processes that communicate via JSON, but I can't quite find the hook for this. Any advice would be appreciated.
Oh right, one more thing. Even after the plugin builds, and despite the LanguageServerProject
being set to output a console application, only the dlls for it get compiled. For some reason the executables are not in the directory for me. As might be expected, this is not the case for the solution in which I've copied the files directly.
After trying it for a while, I cannot shake of the perception that there is something broken somewhere.
After the project is cloned and opened in VS, the first issue that I've run into is that the project just would not build. What happened is that the Nuget restore for the
FsharpLanguageServer
project will fail to download the relevant packages regardless of how long I let it run. The only way to get through this is to uninstallFsharp.Compiler.Service
andHtmlAgilityPack
by hand and reinstall them again.That gets me far enough to actually build the project.
Then I run into this issue. The missing dlls are the same, only the versions given are different. This happens when I run the project directly from the IDE (rather than the command line).
I've tried the dotnet-3 branch as well and this error also happens there (along with the package restore issue). The missing dlls issue also happens when I create my own solution and copy the project files into it.
So far I haven't figured out how to actually run the server.
I've traced it via the debugger and the missing dll error gets triggered in the
processQueue.Take()
call. I have absolutely no idea what the problem withSystem.Collections.Concurrent.BlockingCollection<PendingTask>
is.Interestingly, this error only happens after the
let server = serverFactory(RealClient(send))
line. By that I mean if you do something like the following, it also gets triggered.When I tried doing the ...
...in the main function the program would just freeze.