Open MikhailArkhipov opened 5 years ago
@MikhailArkhipov Thanks for filing the issue. Could you post your omnisharp log(View-->Output--> OmniSharp log) ?
I cloned the repo and go to def works for me, however I do see there is some error due to which codelens is not coming up.
Sure
Starting OmniSharp server at 10/11/2018, 3:20:10 PM
Target: /Users/mikhaila/PLS/src/PLS.sln
OmniSharp server started.
Path: /Users/mikhaila/.vscode/extensions/ms-vscode.csharp-1.16.2/.omnisharp/1.32.5/run
PID: 22034
[info]: OmniSharp.Stdio.Host
Starting OmniSharp on MacOS 10.13.6 (x64)
[info]: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 1 MSBuild instance(s)
1: StandAlone 15.0 - "/Users/mikhaila/.vscode/extensions/ms-vscode.csharp-1.16.2/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to '/Users/mikhaila/.vscode/extensions/ms-vscode.csharp-1.16.2/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin/MSBuild.dll'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: StandAlone 15.0 - "/Users/mikhaila/.vscode/extensions/ms-vscode.csharp-1.16.2/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin"
MSBuildExtensionsPath = /Library/Frameworks/Mono.framework/Versions/5.4.0/lib/mono/xbuild
BypassFrameworkInstallChecks = true
CscToolPath = /Users/mikhaila/.vscode/extensions/ms-vscode.csharp-1.16.2/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin/Roslyn
CscToolExe = csc.exe
MSBuildToolsPath = /Users/mikhaila/.vscode/extensions/ms-vscode.csharp-1.16.2/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin
TargetFrameworkRootPath = /Library/Frameworks/Mono.framework/Versions/5.4.0/lib/mono/xbuild-frameworks
[info]: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in '/Users/mikhaila/PLS/src'.
[info]: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
[info]: OmniSharp.WorkspaceInitializer
Project system 'OmniSharp.DotNet.DotNetProjectSystem' is disabled in the configuration.
[info]: OmniSharp.MSBuild.ProjectSystem
Detecting projects in '/Users/mikhaila/PLS/src/PLS.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/mikhaila/PLS/src/LanguageServer/Impl/Microsoft.Python.LanguageServer.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/mikhaila/PLS/src/UnitTests/Core/Impl/UnitTests.Core.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/mikhaila/PLS/src/Analysis/Engine/Impl/Microsoft.Python.Analysis.Engine.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/mikhaila/PLS/src/Analysis/Engine/Test/Microsoft.Python.Analysis.Engine.Tests.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/Users/mikhaila/PLS/src'.
[info]: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
[info]: OmniSharp.WorkspaceInitializer
Configuration finished.
[info]: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location '/Users/mikhaila/PLS/src' on host 22007.
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/mikhaila/PLS/src/LanguageServer/Impl/Microsoft.Python.LanguageServer.csproj
also, screenshot - outline never comes back so it seems like something is stuck. Did you open src
?
Windows, different machine - same thing. CPU is lower, around 8-10%, but that machines has many more cores than Macbook.
@MikhailArkhipov I think this is a large project so omnisharp is taking a long timr to add the projects to the workspace. I waited for around 1-2 minutes and it worked for me. I am able to get the references and F12 also works. Can you try setting "omnisharp. project load timeout" to a higher value and then Ctrl+Shift+P --> Restart Omnisharp
Also, regarding the Mac consumption, it is a known issue but we havent been able to look into it so far. We will try to get is resolved as soon as possible.
OK, 2-3 min down the road it works. However, in VS 2017 same project takes 5 seconds to become fully available. Feel free to close, but aren't you using same tech? The project is not large to any extent, 2 projects with maybe 10K lines total?
@MikhailArkhipov That's a good question. Obviously the exact implementations differ (and you are running on Mono, which may be slower), but the discrepancy is worth looking into. There's probably some low-hanging fruit we can address to speed this up.
Now, on my other Mac (extensively upgraded "classic" Mac Pro) everything is very fast. It has 24 cores though, with dual Xeons.
NET Core SDK (reflecting any global.json):
Version: 2.1.402
Commit: 3599f217f4
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.13
OS Platform: Darwin
RID: osx.10.13-x64
Base Path: /usr/local/share/dotnet/sdk/2.1.402/
Host (useful for support):
Version: 2.1.4
Commit: 85255dde3e
.NET Core SDKs installed:
2.1.4 [/usr/local/share/dotnet/sdk]
2.1.300-preview1-008174 [/usr/local/share/dotnet/sdk]
2.1.402 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.0-preview1-final [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.0-preview1-final [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.0-preview1-26216-03 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Starting OmniSharp server at 10/13/2018, 9:53:09 PM
Target: /Users/Misha/Work/PLS/src/PLS.sln
OmniSharp server started.
Path: /Users/Misha/.vscode/extensions/ms-vscode.csharp-1.16.2/.omnisharp/1.32.5/run
PID: 54820
[info]: OmniSharp.Stdio.Host
Starting OmniSharp on MacOS 10.13.6 (x64)
[info]: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 1 MSBuild instance(s)
1: StandAlone 15.0 - "/Users/Misha/.vscode/extensions/ms-vscode.csharp-1.16.2/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to '/Users/Misha/.vscode/extensions/ms-vscode.csharp-1.16.2/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin/MSBuild.dll'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: StandAlone 15.0 - "/Users/Misha/.vscode/extensions/ms-vscode.csharp-1.16.2/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin"
MSBuildExtensionsPath = /Library/Frameworks/Mono.framework/Versions/5.4.0/lib/mono/xbuild
BypassFrameworkInstallChecks = true
CscToolPath = /Users/Misha/.vscode/extensions/ms-vscode.csharp-1.16.2/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin/Roslyn
CscToolExe = csc.exe
MSBuildToolsPath = /Users/Misha/.vscode/extensions/ms-vscode.csharp-1.16.2/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin
TargetFrameworkRootPath = /Library/Frameworks/Mono.framework/Versions/5.4.0/lib/mono/xbuild-frameworks
[info]: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in '/Users/Misha/Work/PLS/src'.
[info]: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
[info]: OmniSharp.WorkspaceInitializer
Project system 'OmniSharp.DotNet.DotNetProjectSystem' is disabled in the configuration.
[info]: OmniSharp.MSBuild.ProjectSystem
Detecting projects in '/Users/Misha/Work/PLS/src/PLS.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/Misha/Work/PLS/src/LanguageServer/Impl/Microsoft.Python.LanguageServer.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/Misha/Work/PLS/src/UnitTests/Core/Impl/UnitTests.Core.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/Misha/Work/PLS/src/Analysis/Engine/Impl/Microsoft.Python.Analysis.Engine.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/Misha/Work/PLS/src/Analysis/Engine/Test/Microsoft.Python.Analysis.Engine.Tests.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/Users/Misha/Work/PLS/src'.
[info]: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/Misha/Work/PLS/src/LanguageServer/Impl/Microsoft.Python.LanguageServer.csproj
[info]: OmniSharp.WorkspaceInitializer
Configuration finished.
[info]: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location '/Users/Misha/Work/PLS/src' on host 54800.
Environment data
dotnet --info
output:VS Code version: 1.28 C# Extension version: 0.19
Steps to reproduce
Clone https://github.com/Microsoft/python-language-server Open src folder
Expected behavior
Intellisense, etc to work
Actual behavior
No intellisense, go to def, etc Mono process takes a lot of CPU for a long time