Closed cachandlerdev closed 1 year ago
My apologies for disturbing the development team. After further testing and looking at the Omnisharp logs, it appears as removing the NuGet
directory and the omnisharp.json
file (which I had inserted a while ago while trying to get VSCode's intellisense working) may have fixed the issue. The initial Omnisharp load time is still a painful 45-50 seconds, but after it loads, everything seems to be running smoothly.
If anybody comes across this in the future and previously opened the project with VSCode after following these steps, check the Omnisharp logs to make sure that your VSCode configuration was not the cause of the issue.
Edit: I posted this before I saw your answer, good to see you got it sorted
So in your demo the server appears to be running for a while but just doing document-local diagnostics, the solution-wide analysis hasn't started yet (diagnostics are not smart, they don't know that some using
s are unnecessary, for example). The server is loading projects. Once the projects load the server starts doing solution-wide analysis which takes quite a while because there are 65 projects.
There are no .csproj or .sln files in the repo so it's hard to know how any of this actually gets built.
The log is full of omnisharp-roslyn server warnings and errors.
The missing analyzer warning at the top of your log mentions not finding part of the path FlappyBird2D/./NuGet/microsoft.unity.analyzers.1.14.0/analyzers/dotnet/cs
. You have an omnisharp.json
file saying to use that analyzer, but the repo includes version 1.16
in the NuGet
directory, NuGet/microsoft.unity.analyzers.1.16.1/analyzers/dotnet/cs/Microsoft.Unity.Analyzers.dll
.
At the end of the log are a series of timed-out analysis queue warnings and failures. This is all server-specific and we can't do anything about it on the client side.
Yes, as I described in the comment above, I think the problem was linked to the NuGet configuration files I setup a while ago in accordance with the VSCode documentation. After removing them, the project still takes a little bit to load, but it's actually usable at this point, and the OmniSharp logs don't appear to list any big issues.
I appreciate your assistance though with the troubles I experienced so far, and hope I won't have to comment on another GitHub issue page for a while!
Environment
Steps to reproduce
init.vim
file (since I use neovim) below that should work for testing purposes. If you're using Fedora, you'll have to installmsbuild
separately before downloading mono here.Assets/Scripts/PlayerCharacter.cs
in vim and wait for the OmniSharp server to load.afafafa
), and wait for the error message to appear.Expected Result
Once the plugins have loaded and the text is added, an error message should appear almost immediately. After it is deleted, the error should go away just as quickly.
Actual Result
On my machine, after the rough 45 second waiting period for Omnisharp to load, it takes another solid minute or two for Ale to start functioning at all, and once the text is added, it takes another 15-20 seconds for the error message to appear. After deleting the text, it takes a similar amount of time for the error to go away.
Given that this process is nearly instantaneous in other editors, and works fine when I copy-pasted the code to another Unity project, I do not believe that my computer's hardware is the cause of the issue.
Visual Proof (screenshots, videos, text)
Screencast from 2023-06-26 15-14-44.webm
I stopped the recording there, but if you waited for another minute or two, you'd see the error message for the text I typed show up.
Omnisharp Log
log.txt