-
Notifications
You must be signed in to change notification settings - Fork 168
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
Failed to load Project with no error message #833
Comments
Have you looked in the log? |
Ahhh, there we go. Knew I was missing something obvious.
Now I have an error to work with at least.
I clearly have dotnet 7.
I also seem to have a lot of sdks installed.. wonder if it's getting confused or something |
What OmniSharp-vim config do you have? This is a dotnet project (not Framework) so I think you'll need to be using the net6 build of omnisharp-roslyn. Do you have |
The only configs I have set up for Omnisharp-vim are: let g:OmniSharp_start_server = 0 I tried setting the SDK and I'll try |
After setting |
By the way,
The default path for system-wide omnisharp.json is |
Well then I guess it didn't make any difference, haha. It does seem to be loading now! I used the bindings suggested in the Wiki, but is there an easy way to use CoC to handle the goto-def, find uses, etc.? Thanks for the help, I appreciate it |
Also, is there any way to start the server in the background so I don't have to wait a couple of minutes every time I want to work on the project? Or do I have a misguided idea of how it works |
You have specifically stopped the server from loading automatically with |
Can you share a log please? I don't think it's working correctly yet - have you re-installed the server? |
Yes, I'm good with that. But when I do manually start the server, it takes about 2 minutes to load all of the csproj files. So my question is; is there a way to start the server outside of vim and leave it running, so when I open vim the server is already running and ready to go, no csproj loading required. All of the bindings are working as expected, so I think things are looking pretty good. If I can get closer CoC integration I'll be very happy |
No vim can't interact with an external process that it hasn't started itself, so the only way to run language servers is for vim to start them and handle all of the input/output. I don't really know what you mean by coc integration. Coc uses certain bindings for go-to-definition, find-usages etc. - just override those same bindings in .cs buffers. |
Ah, makes sense. Maybe I could use the HTTP interaction instead? Could I do the whole background thing in that setup? Good idea on the rebinds, simple and easy 👍 |
What you are describing is basically the only benefit to the HTTP version of the server, over stdio - yes it worked independently of vim that way. Unfortunately that integration was also very limited and so is extremely light on features. The HTTP integration used python and hasn't been developed in several years. There is syntax highlighting but it's not highly accurate, there is no test runner, the log is much more basic. Essentially ... I don't recommend it. If I were you I'd create personal .sln files to deal with the project or projects you are using. That is a matter of a few seconds: dotnet new sln -n MyTempSolution
dotnet sln MyTempSolution.sln add Proj1.csproj
dotnet sln MyTempSolution.sln add Proj2.csproj |
That's a pretty good idea. Not ideal, but it's a fair compromise. For projects that I don't add, will they be essentially invisible to find-usages, etc.? |
Yes.
You must have come across similar speed issues in VS/Rider with a 120-project solution? The nice thing is that vim is really good at search, especially configuring Its' a pretty standard trade-off between the convenience of having the language server looking at the entire code-base, and the speed of just running in part of it. I'm not suggesting you change your entire org, but having a few personal .sln files around just makes things much faster. |
Fair enough
Oh yeah, definitely. It's even longer probably because of all of the other processes/tools that run in the background. The difference for me is I can easily leave Rider running all day, so the speed problem is only inconvenient when I checkout a different branch (and, of course, on startup)
Do you ever run into issues with Shared structs/classes that are used between/amongst multiple solutions? Type converters, error handlers, etc. or do you add a lot of the shared stuff into each of your personal solution files? (or perhaps more broadly, if you know that project X and Y have a tight correlation, would your personal files load both X and Y when you open either?) One more question: I found that when loading everything, goto definition, find references, etc. is fairly slow. Maybe 2-5 seconds sometimes. Is that problem reduced when you limit how many projects are loaded? |
This is actually how I started using vim 😄. I had a really slow machine at one point and used to use vim for fast edits while I was waiting for VS to become usable.
You don't do this with vim?
I don't actually use personal solution files very often, because our repo is structured with lots of smaller solutions anyway. But ...
... yes this can be an issue. When you modify an interface or struct at a lower level, then you may well need to restart the higher-level servers, with
So after modifying something in [Solution1] I may need to restart the others, which is no issue for [Solution2] and [Solution3] but is annoying in [TooBigSolution] with 31 projects - I do actually use personal solutions to break up [TooBigSolution] sometimes.
You can do that, although if you have 2 servers running simultaneously where they both include X, then modifying X in one won't be reflected in the other until you restart it.
I expect so. I never work in a solution as big as yours but go-to-definition and find-usages never take longer than half a second, unless the server is still warming up. I just tried in [TooBigSolution] and find-implementations took maybe a second on an interface with 137 implementations the first time, maybe quarter of a second after that. |
OS: OSX
Vim: Neovim v0.9.0
Dotnet: 7.0.102 SDK
Opening a large monorepo and starting the OmniSharp server (only used the built-in Install command) with:
Leads to a
Failed to load project
message for every.csproj
file in the monorepo, but it doesn't provide a reason for why it failed. i.e.:Just trying to figure out what I can do to debug this further.
Let me know if you need to know anything else about my setup. Thank you!
The text was updated successfully, but these errors were encountered: