Avoid downloading `omnisharp-roslyn` binaries when `omnisharp.path` is a path to a local file
- Dominant language
- TypeScript
- Stars
- 3.1k
- Forks
- 737
- Avg merge
- 18h 40m
- Merged PRs (30d)
- 31
Description
## Issue Description ##
The VSCode extension after some updates downloads a tarball with binary release of `omnisharp-roslyn`. However, when `omnisharp.path` extension setting is an absolute path to a local file, the downloaded package is unused, making the download itself unnecessary and wasteful, both in transfer/storage terms but also increasing time it takes for the extension to finish loading. It would be nice if `omnisharp-roslyn` was not downloaded if it's not going to be used anyway.
## Steps to Reproduce ##
Set `omnisharp.path` to some external installation of `omnisharp-roslyn` (in my case, `/usr/lib/omnisharp/OmniSharp.exe`) and `omnisharp.useGlobalMono` to `"always"`. Of course, `mono` and its flavor of `msbuild` should also be properly installed. Then, remove release downloaded by the extension (or the entire extension itself and all its data, then reinstall it) and activate the extension again.
## Expected Behavior ##
`omnisharp-vscode` should skip downloading `omnisharp-roslyn` and immediately launch assembly configured in `omnisharp.path`.
## Actual Behavior ##
`omnisharp-vscode` downloads `omnisharp-roslyn` and `vsdbg`, extracts archives and only then launches assembly configured in `omnisharp.path`. Both downloaded packages seem to be unused.
## Environment information ##
**VSCode version**: 1.51.1
**C# Extension**: 1.23.8
Mono Information
```
$ mono --version
Mono JIT compiler version 6.12.0.107 (tarball Thu Dec 10 12:48:21 AM CET 2020)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: supported, not enabled.
Suspend: hybrid
GC: sgen (concurrent by default)
$ msbuild -version
Microsoft (R) Build Engine version 16.8.0-ci-20618-01 for Mono
Copyright (C) Microsoft Corporation. All rights reserved.
16.8.0.61801
```
Dotnet Information
```
.NET SDK (reflecting any global.json):
Version: 5.0.101
Commit: d05174dc5a
Runtime Environment:
OS Name: arch
OS Version:
OS Platform: Linux
RID: arch-x64
Base Path: /usr/share/dotnet/sdk/5.0.101/
Host (useful for support):
Version: 5.0.1
Commit: b02e13abab
.NET SDKs installed:
2.1.811 [/usr/share/dotnet/sdk]
2.2.207 [/usr/share/dotnet/sdk]
3.0.103 [/usr/share/dotnet/sdk]
3.1.404 [/usr/share/dotnet/sdk]
5.0.101 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.23 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.23 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.10 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.23 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.10 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
```
Contributor guide
Assessment
This issue has not been assessed yet.