Closed genne closed 5 years ago
Yeah, it's just straight up timing out at. Tried it with just including seperate analyzer packages (e.g. just Microsoft.NetCore.Analyzers) and that still times out. Different versions don't seem to impact it either ( tried latest 2.9.3, 2.6.3 and 2.6.0). It might be something VS specific thats causing this. Nothing more is being outputed in trace level logs from omnisharp server. Also it fails on roslyn 1.33.0 and on 1.34.0.
[dbug]: OmniSharp.Roslyn.CSharp.Workers.Diagnostics.AnalyzerWorkQueue
Timeout before work got ready for one of documents
Upon further investigation it's not really specific to that analyzer I think. I have these installed:
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="16.0.102" />
<PackageReference Include="AspNetCoreAnalyzers" Version="0.2.0-dev">
and after restarting omnisharp it also keeps timeouting for a while. Though I guess that could be considered normal behaviour as it does stop after a while, unlike when FxCop is included. But these timeouts also happen when using 1.34.0 binary (mentioning because it has updates to analyzer performance).
This has been discussed a little in #1301. However, I think a separate issue for this is a good idea. Its been a problem for a while and makes some Analyzers useless.
Just wondering if you could provide a rough estimate on when this will be available @filipw?
I am currently running a build from source of that PR in order to use FxCop, but the quicker we can jump back on to the main stream the better :).
Thanks for your good work.
EDIT:
Ignore me, I just set my path to "latest" which has downloaded master and fixes the problem!
I think the safer way will be to use "omnisharp.path": "1.34.1-beta.14"
.
With latest
it will keep downloading on every merge to master which may or may not be annoying and may or may not be stable 😀this way you pin it to the specific build.
We could release that as stable quite soon, however ultimately C# extension for VS Code has a different release cycle anyway, so you'd need to check with @rchande or @akshita31. normally there has been a release roughly once per month, with the last one, 1.21.0 a week ago.
I guess if you were to release as stable, we could then target that stable version number, until the C# extension is next released?
Issue Description
Can't get
Microsoft.CodeAnalysis.FxCopAnalyzers
to load, Omnisharp log includes the following failure:Analysis of document failed or cancelled by timeout: The operation was canceled.
Steps to Reproduce
dotnet new console
dotnet add package Microsoft.CodeAnalysis.FxCopAnalyzers
Example repository: https://github.com/genne/fxcop-vscode-not-loading
Expected Behavior
Should show analyzer warnings
Actual Behavior
Nothing happens
Logs
OmniSharp log
C# log
Environment information
VSCode version: 1.36.0 C# Extension: 1.20.0
Dotnet Information
.NET Core SDK (reflecting any global.json): Version: 2.2.301 Commit: 70d6be0814 Runtime Environment: OS Name: Windows OS Version: 10.0.17134 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.2.301\ Host (useful for support): Version: 2.2.6 Commit: 7dac9b1b51 .NET Core SDKs installed: 1.0.3 [C:\Program Files\dotnet\sdk] 2.0.3 [C:\Program Files\dotnet\sdk] 2.1.103 [C:\Program Files\dotnet\sdk] 2.1.202 [C:\Program Files\dotnet\sdk] 2.1.400 [C:\Program Files\dotnet\sdk] 2.1.503 [C:\Program Files\dotnet\sdk] 2.1.602 [C:\Program Files\dotnet\sdk] 2.1.604 [C:\Program Files\dotnet\sdk] 2.1.700 [C:\Program Files\dotnet\sdk] 2.2.105 [C:\Program Files\dotnet\sdk] 2.2.301 [C:\Program Files\dotnet\sdk] .NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 1.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 1.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-downloadVisual Studio Code Extensions
|Extension|Author|Version| |---|---|---| |azure-account|ms-vscode|0.8.4| |azure-iot-toolkit|vsciot-vscode|2.8.0| |azure-pipelines|ms-azure-devops|1.152.0| |azure-storage-explorer|formulahendry|0.1.2| |azurecli|ms-vscode|0.4.6| |azurerm-vscode-tools|msazurermtools|0.6.0| |csharp|ms-vscode|1.20.0| |csharpextensions|jchannon|1.3.0| |csharpfixformat|Leopotam|0.0.81| |debugger-for-chrome|msjsdiag|4.11.6| |gitlens|eamodio|9.8.5| |HTMLHint|mkaufman|0.6.0| |mssql|ms-mssql|1.6.0| |open-related-files|genne|0.0.1| |powershell|ms-vscode|2019.5.0| |prettier-vscode|esbenp|1.9.0| |rest-client|humao|0.21.3| |vscode-apimanagement|ms-azuretools|0.1.1| |vscode-azure-storage-utility|Compulim|0.0.2| |vscode-azureappservice|ms-azuretools|0.15.0| |vscode-azurefunctions|ms-azuretools|0.17.1| |vscode-azurestorage|ms-azuretools|0.7.0| |vscode-cosmosdb|ms-azuretools|0.10.2| |vscode-csscomb|mrmlnc|5.2.3| |vscode-node-azure-pack|ms-vscode|0.0.9| |vscode-pull-request-github|GitHub|0.9.0| |vscode-typescript-tslint-plugin|ms-vscode|1.2.2| |vscodeintellicode|VisualStudioExptTeam|1.1.7|;