Skip to content
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

Update to OmniSharp 1.37.0 #3998

Merged
merged 2 commits into from
Aug 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@
"updatePackageDependencies"
],
"env": {
"NEW_DEPS_URLS": "https://download.visualstudio.microsoft.com/download/pr/ee1ca529-674e-45c8-b9fd-ead0a47b3d24/e709a2e2355f7852a2bb69162931e203/omnisharp-linux-x64-1.36.1.zip,https://download.visualstudio.microsoft.com/download/pr/ee1ca529-674e-45c8-b9fd-ead0a47b3d24/a8a83487d32ce93a1652af1bac993c61/omnisharp-linux-x86-1.36.1.zip,https://download.visualstudio.microsoft.com/download/pr/ee1ca529-674e-45c8-b9fd-ead0a47b3d24/7fc494bdae565285e50b85a233083fa5/omnisharp-osx-1.36.1.zip,https://download.visualstudio.microsoft.com/download/pr/ee1ca529-674e-45c8-b9fd-ead0a47b3d24/93957c055d3fd13a22bfbe1ddbf07e14/omnisharp-win-x64-1.36.1.zip,https://download.visualstudio.microsoft.com/download/pr/ee1ca529-674e-45c8-b9fd-ead0a47b3d24/fb3b05998a1c260de9af6d2458c3d9c8/omnisharp-win-x86-1.36.1.zip",
"NEW_DEPS_VERSION": "1.36.1"
"NEW_DEPS_URLS": "https://download.visualstudio.microsoft.com/download/pr/58378208-fe81-49fb-87a4-7b68012b1444/aff0374fda57f9071cb63d5005abc950/omnisharp-linux-x64-1.37.0.zip,https://download.visualstudio.microsoft.com/download/pr/58378208-fe81-49fb-87a4-7b68012b1444/52ae129aa3fbc33e11a40183e625de77/omnisharp-linux-x86-1.37.0.zip,https://download.visualstudio.microsoft.com/download/pr/58378208-fe81-49fb-87a4-7b68012b1444/5701e95fd6b802c2417e67aa7b9b9c45/omnisharp-osx-1.37.0.zip,https://download.visualstudio.microsoft.com/download/pr/58378208-fe81-49fb-87a4-7b68012b1444/f685717e82eeb5cded478ac291643898/omnisharp-win-x64-1.37.0.zip,https://download.visualstudio.microsoft.com/download/pr/58378208-fe81-49fb-87a4-7b68012b1444/32db11926bcaa92a44cc682d4d156254/omnisharp-win-x86-1.37.0.zip",
"NEW_DEPS_VERSION": "1.37.0"
},
"cwd": "${workspaceFolder}"
}
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
* As an alternative, consider installing the [MSBuild Project Tools](https://marketplace.visualstudio.com/items?itemName=tintoy.msbuild-project-tools) extension by @tintoy.
* Renaming symbol fails within a file that had recently been renamed without saving changes.
* As a workaround, make an edit within the file before using Rename Symbol.

## 1.23.1 (Not yet released)
* Register FixAll commands for disposal ([#3984](https://github.com/OmniSharp/omnisharp-vscode/issues/3984), PR: [#3985](https://github.com/OmniSharp/omnisharp-vscode/pull/3985))
* Include version matched target files with minimal MSBuild (PR: [omnisharp-roslyn#1895](https://github.com/OmniSharp/omnisharp-roslyn/pull/1895))
* Fix lack of trailing italics in quickinfo (PR: [omnisharp-roslyn#1894](https://github.com/OmniSharp/omnisharp-roslyn/pull/1894))
* Set meaning of UseGlobalMono "auto" to "never" until Mono updates their MSBuild (PR: [#3998](https://github.com/OmniSharp/omnisharp-vscode/pull/3998))

## 1.23.0 (August 14, 2020)
* Fix typo in supressBuildAssetsNotification setting name ([#3941](https://github.com/OmniSharp/omnisharp-vscode/issues/3941), PR: [#3942](https://github.com/OmniSharp/omnisharp-vscode/pull/3942))
Expand Down
31 changes: 6 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,15 @@ The C# extension is powered by [OmniSharp](https://github.com/OmniSharp/omnishar

## Note about using .NET Core 3.1.401 or .NET 5 Preview 8 SDKs on Mono platforms

Because of the new minimum MSBuild version requirement of these new SDKs, it will be necessary to use the Mono packaged with the C# extension. You can set "omnisharp.useGlobalMono" to "never" in the VS Code settings to force the use of the included Mono.
Because of the new minimum MSBuild version requirement of these new SDKs, it will be necessary to use the Mono packaged with the C# extension. The meaning of "omnisharp.useGlobalMono" has change to "never", this forces the use of the included Mono. To use your system
install of Mono set the value to "always" although it may not be compatible with newer SDKs.

## What's new in 1.23.1
- Register FixAll commands for disposal ([#3984](https://github.com/OmniSharp/omnisharp-vscode/issues/3984), PR: [#3985](https://github.com/OmniSharp/omnisharp-vscode/pull/3985))
- Register FixAll commands for disposal ([#3984](https://github.com/OmniSharp/omnisharp-vscode/issues/3984), PR: [#3985](https://github.com/OmniSharp/omnisharp-vscode/pull/3985))
- Include version matched target files with minimal MSBuild (PR: [omnisharp-roslyn#1895](https://github.com/OmniSharp/omnisharp-roslyn/pull/1895))
- Fix lack of trailing italics in quickinfo (PR: [omnisharp-roslyn#1894](https://github.com/OmniSharp/omnisharp-roslyn/pull/1894))
- Set meaning of UseGlobalMono "auto" to "never" until Mono updates their MSBuild (PR: [#3998](https://github.com/OmniSharp/omnisharp-vscode/pull/3998))

## What's new in 1.23.0
- Fix typo in supressBuildAssetsNotification setting name ([#3941](https://github.com/OmniSharp/omnisharp-vscode/issues/3941), PR: [#3942](https://github.com/OmniSharp/omnisharp-vscode/pull/3942))
Expand All @@ -40,7 +45,6 @@ Because of the new minimum MSBuild version requirement of these new SDKs, it wil
- Fix all providers support (PR: [#3440](https://github.com/OmniSharp/omnisharp-vscode/pull/3440), PR: [omnisharp-roslyn#1581](https://github.com/OmniSharp/omnisharp-roslyn/pull/1581))
- Fix MSBuild version mismatch with new SDKs ([omnisharp-vscode#3951](https://github.com/OmniSharp/omnisharp-vscode/issues/3951), PR: [#1883](https://github.com/OmniSharp/omnisharp-roslyn/pull/1883))


## What's new in 1.22.2
- Updated Razor support
- Improved Semantic Highlighting support by fixing some scenarios which might lead to thrown exceptions and incorrect results. [dotnet/aspnetcore-tooling#2126](https://github.com/dotnet/aspnetcore-tooling/pull/2126)
Expand All @@ -57,29 +61,6 @@ Because of the new minimum MSBuild version requirement of these new SDKs, it wil
- Make "Run/debug tests in context" position a link ([#3915](https://github.com/OmniSharp/omnisharp-vscode/pull/3915))
- Update browser launch regex to support non-default logging frameworks ([#3842](https://github.com/OmniSharp/omnisharp-vscode/pull/3842))

## What's new in 1.22.1
- Added LSP handler for `textDocument/codeAction` request. (PR: [omnisharp-roslyn#1795](https://github.com/OmniSharp/omnisharp-roslyn/pull/1795))
- Expose a custom LSP `omnisharp/client/findReferences` command via code lens (meant to be handled by LSP client). (PR: [#omnisharp-roslyn/1807](https://github.com/OmniSharp/omnisharp-roslyn/pull/1807))
- Added `DirectoryDelete` option to `FileChangeType` allowing clients to report deleted directories that need to be removed (along all the files) from the workspace (PR: [#3829](https://github.com/OmniSharp/omnisharp-vscode/pull/3829), PR: [omnisharp-roslyn#1821](https://github.com/OmniSharp/omnisharp-roslyn/pull/1821))
- Do not crash when plugin assembly cannot be loaded ([omnisharp-roslyn#1307](https://github.com/OmniSharp/omnisharp-roslyn/issues/1307), PR: [omnisharp-roslyn#1827](https://github.com/OmniSharp/omnisharp-roslyn/pull/1827))
- Update browser launch regex to support non-default logging frameworks ([#3842](https://github.com/OmniSharp/omnisharp-vscode/pull/3842))
- Improved support for Codespaces

## What's new in 1.22.0
- Add setting for enabling go to decompilation (PR: [#3774](https://github.com/OmniSharp/omnisharp-vscode/pull/3774))
- Add experimental Semantic Highlighter `csharp.semanticHighlighting.enabled` ([#3565](https://github.com/OmniSharp/omnisharp-vscode/issues/3565), PR: [#3667](https://github.com/OmniSharp/omnisharp-vscode/pull/3667)
- Add commands for Run and Debug Tests in Context (PR: [#3772](https://github.com/OmniSharp/omnisharp-vscode/pull/3772), PR: [omnisharp-roslyn#1782](https://github.com/OmniSharp/omnisharp-roslyn/pull/1782))
- Do not add references CodeLens to Dispose methods ([#3243](https://github.com/OmniSharp/omnisharp-vscode/issues/3243), PR: [#3780](https://github.com/OmniSharp/omnisharp-vscode/pull/3780))
- Add Visual Studio 2019 themes with semantic colors (PR: [#3790](https://github.com/OmniSharp/omnisharp-vscode/pull/3790))
- Added support for `WarningsAsErrors` in csproj files (PR: [omnisharp-roslyn#1779](https://github.com/OmniSharp/omnisharp-roslyn/pull/1779))
- Added support for `WarningsNotAsErrors` in csproj files ([omnisharp-roslyn#1681](https://github.com/OmniSharp/omnisharp-roslyn/issues/1681), PR: [#1784](https://github.com/OmniSharp/omnisharp-roslyn/pull/1784))
- Improved MSBuild scoring system ([omnisharp-roslyn#1783](https://github.com/OmniSharp/omnisharp-roslyn/issues/1783), PR: [omnisharp-roslyn#1797](https://github.com/OmniSharp/omnisharp-roslyn/pull/1797))
- Updated OmniSharp.Extensions.LanguageServer to `0.14.2` to fix synchronisation (PR: [omnisharp-roslyn#1791](https://github.com/OmniSharp/omnisharp-roslyn/pull/1791))
- Add test discovery and NoBuild option to test requests (PR: [omnisharp-roslyn#1719](https://github.com/OmniSharp/omnisharp-roslyn/pull/1719))
- Updated Razor support
- Enable Semantic Highlighting for Razor TagHelpers and Blazor components ([dotnet/aspnetcore#21713](https://github.com/dotnet/aspnetcore/issues/21713))
- Add support for Blazor WebAssembly-specific debug adapter ([dotnet/aspnetcore-tooling#1885](https://github.com/dotnet/aspnetcore-tooling/pull/1885))

### Emmet support in Razor files

To enable emmet support, add the following to your settings.json:
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 27 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"dotnet"
],
"defaults": {
"omniSharp": "1.36.1",
"omniSharp": "1.37.0",
"razor": "5.0.0-rc.1.20378.7"
},
"main": "./dist/extension",
Expand Down Expand Up @@ -162,58 +162,58 @@
{
"id": "OmniSharp",
"description": "OmniSharp for Windows (.NET 4.6 / x86)",
"url": "https://download.visualstudio.microsoft.com/download/pr/ee1ca529-674e-45c8-b9fd-ead0a47b3d24/fb3b05998a1c260de9af6d2458c3d9c8/omnisharp-win-x86-1.36.1.zip",
"fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.36.1/omnisharp-win-x86-1.36.1.zip",
"installPath": ".omnisharp/1.36.1",
"url": "https://download.visualstudio.microsoft.com/download/pr/58378208-fe81-49fb-87a4-7b68012b1444/32db11926bcaa92a44cc682d4d156254/omnisharp-win-x86-1.37.0.zip",
"fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.37.0/omnisharp-win-x86-1.37.0.zip",
"installPath": ".omnisharp/1.37.0",
"platforms": [
"win32"
],
"architectures": [
"x86"
],
"installTestPath": "./.omnisharp/1.36.1/OmniSharp.exe",
"installTestPath": "./.omnisharp/1.37.0/OmniSharp.exe",
"platformId": "win-x86",
"integrity": "A5EDBE147A3E67EF9F36BCD30CBA2C1A8212E2594569709F06A35F29D8D5C320"
"integrity": "B68B2B28C21BAC05C2A2A5554A3F96A7CA2292BBE8332D0044E6002272427198"
},
{
"id": "OmniSharp",
"description": "OmniSharp for Windows (.NET 4.6 / x64)",
"url": "https://download.visualstudio.microsoft.com/download/pr/ee1ca529-674e-45c8-b9fd-ead0a47b3d24/93957c055d3fd13a22bfbe1ddbf07e14/omnisharp-win-x64-1.36.1.zip",
"fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.36.1/omnisharp-win-x64-1.36.1.zip",
"installPath": ".omnisharp/1.36.1",
"url": "https://download.visualstudio.microsoft.com/download/pr/58378208-fe81-49fb-87a4-7b68012b1444/f685717e82eeb5cded478ac291643898/omnisharp-win-x64-1.37.0.zip",
"fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.37.0/omnisharp-win-x64-1.37.0.zip",
"installPath": ".omnisharp/1.37.0",
"platforms": [
"win32"
],
"architectures": [
"x86_64"
],
"installTestPath": "./.omnisharp/1.36.1/OmniSharp.exe",
"installTestPath": "./.omnisharp/1.37.0/OmniSharp.exe",
"platformId": "win-x64",
"integrity": "4BC3FF889B54561AE76870E5B2047CA6FF0CD6E5E78882288C7598A882142083"
"integrity": "4505E6DFEAC1EF93318F0371DA2678C04DDB6BE916DEDF1CE95EC7A1CE37561E"
},
{
"id": "OmniSharp",
"description": "OmniSharp for OSX",
"url": "https://download.visualstudio.microsoft.com/download/pr/ee1ca529-674e-45c8-b9fd-ead0a47b3d24/7fc494bdae565285e50b85a233083fa5/omnisharp-osx-1.36.1.zip",
"fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.36.1/omnisharp-osx-1.36.1.zip",
"installPath": ".omnisharp/1.36.1",
"url": "https://download.visualstudio.microsoft.com/download/pr/58378208-fe81-49fb-87a4-7b68012b1444/5701e95fd6b802c2417e67aa7b9b9c45/omnisharp-osx-1.37.0.zip",
"fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.37.0/omnisharp-osx-1.37.0.zip",
"installPath": ".omnisharp/1.37.0",
"platforms": [
"darwin"
],
"binaries": [
"./mono.osx",
"./run"
],
"installTestPath": "./.omnisharp/1.36.1/run",
"installTestPath": "./.omnisharp/1.37.0/run",
"platformId": "osx",
"integrity": "63D28266188D7F015FB17F16B5E9EB7EF1E211DC022DE0D25E4BA852DF7BB68D"
"integrity": "64761F4D1ACF7C121FB9735C1F5842A4E1845D4782ED390A285436B9F3B6E62F"
},
{
"id": "OmniSharp",
"description": "OmniSharp for Linux (x86)",
"url": "https://download.visualstudio.microsoft.com/download/pr/ee1ca529-674e-45c8-b9fd-ead0a47b3d24/a8a83487d32ce93a1652af1bac993c61/omnisharp-linux-x86-1.36.1.zip",
"fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.36.1/omnisharp-linux-x86-1.36.1.zip",
"installPath": ".omnisharp/1.36.1",
"url": "https://download.visualstudio.microsoft.com/download/pr/58378208-fe81-49fb-87a4-7b68012b1444/52ae129aa3fbc33e11a40183e625de77/omnisharp-linux-x86-1.37.0.zip",
"fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.37.0/omnisharp-linux-x86-1.37.0.zip",
"installPath": ".omnisharp/1.37.0",
"platforms": [
"linux"
],
Expand All @@ -225,16 +225,16 @@
"./mono.linux-x86",
"./run"
],
"installTestPath": "./.omnisharp/1.36.1/run",
"installTestPath": "./.omnisharp/1.37.0/run",
"platformId": "linux-x86",
"integrity": "23470AA972CDB584BF27C4BDF41C6D56A8E886436B444BC5F834F5C8F97AA8D0"
"integrity": "56FA2ABCDA6400D3E45F6D28B9237530CA689944FB7D743187EBCFB47281E4DD"
},
{
"id": "OmniSharp",
"description": "OmniSharp for Linux (x64)",
"url": "https://download.visualstudio.microsoft.com/download/pr/ee1ca529-674e-45c8-b9fd-ead0a47b3d24/e709a2e2355f7852a2bb69162931e203/omnisharp-linux-x64-1.36.1.zip",
"fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.36.1/omnisharp-linux-x64-1.36.1.zip",
"installPath": ".omnisharp/1.36.1",
"url": "https://download.visualstudio.microsoft.com/download/pr/58378208-fe81-49fb-87a4-7b68012b1444/aff0374fda57f9071cb63d5005abc950/omnisharp-linux-x64-1.37.0.zip",
"fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.37.0/omnisharp-linux-x64-1.37.0.zip",
"installPath": ".omnisharp/1.37.0",
"platforms": [
"linux"
],
Expand All @@ -245,9 +245,9 @@
"./mono.linux-x86_64",
"./run"
],
"installTestPath": "./.omnisharp/1.36.1/run",
"installTestPath": "./.omnisharp/1.37.0/run",
"platformId": "linux-x64",
"integrity": "07755A44B25E46A9354BE19695DD3465E0C0ECF39DC01706E19A93631E0525A3"
"integrity": "09E9CB207A61972DD7C608999024EF38B4A66E703041C1C013277CAB98A4F8D6"
},
{
"id": "Debugger",
Expand Down Expand Up @@ -3476,4 +3476,4 @@
]
}
}
}
}
10 changes: 7 additions & 3 deletions src/omnisharp/OmniSharpMonoResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ export class OmniSharpMonoResolver implements IMonoResolver {

return monoInfo;
}
else if (options.useGlobalMono === "auto" && isValid) {
return monoInfo;
}

// While wwaiting for Mono to ship with a MSBuild version 16.7 or higher, we will treat "auto"
// as "Use included Mono".

// else if (options.useGlobalMono === "auto" && isValid) {
// return monoInfo;
//}

return undefined;
}
Expand Down
36 changes: 27 additions & 9 deletions test/unitTests/omnisharp/OmniSharpMonoResolver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ suite(`${OmniSharpMonoResolver.name}`, () => {
const requiredMonoVersion = "6.4.0";
const higherMonoVersion = "6.6.0";

// Sets the meaning of UseGlobalMono "auto". When false, "auto" means "never".
const autoMeansAlways = false;

const getMono = (version: string) => async (env: NodeJS.ProcessEnv) => {
getMonoCalled = true;
environment = env;
Expand Down Expand Up @@ -54,7 +57,7 @@ suite(`${OmniSharpMonoResolver.name}`, () => {
expect(monoInfo).to.be.undefined;
});

test(`it returns the path and version if the version is greater than or equal to ${requiredMonoVersion} and getGlobalMonoInfo is always`, async () => {
test(`it returns the path and version if the version is greater than or equal to ${requiredMonoVersion} and useGlobalMono is always`, async () => {
let monoResolver = new OmniSharpMonoResolver(getMono(requiredMonoVersion));
let monoInfo = await monoResolver.getGlobalMonoInfo({
...options,
Expand All @@ -66,16 +69,21 @@ suite(`${OmniSharpMonoResolver.name}`, () => {
expect(monoInfo.path).to.be.equal(monoPath);
});

test(`it returns the path and version if the version is greater than or equal to ${requiredMonoVersion} and getGlobalMonoInfo is auto`, async () => {
test(`it returns the path and version if the version is greater than or equal to ${requiredMonoVersion} and useGlobalMono is auto`, async () => {
let monoResolver = new OmniSharpMonoResolver(getMono(higherMonoVersion));
let monoInfo = await monoResolver.getGlobalMonoInfo({
...options,
useGlobalMono: "auto",
monoPath: monoPath
});

expect(monoInfo.version).to.be.equal(higherMonoVersion);
expect(monoInfo.path).to.be.equal(monoPath);
if (!autoMeansAlways) {
expect(monoInfo).to.be.undefined;
}
else {
expect(monoInfo.version).to.be.equal(higherMonoVersion);
expect(monoInfo.path).to.be.equal(monoPath);
}
});

test(`it throws exception if getGlobalMonoInfo is always and version<${requiredMonoVersion}`, async () => {
Expand All @@ -96,20 +104,30 @@ suite(`${OmniSharpMonoResolver.name}`, () => {
monoPath: monoPath
});

expect(monoInfo.env["PATH"]).to.contain(join(monoPath, 'bin'));
expect(monoInfo.env["MONO_GAC_PREFIX"]).to.be.equal(monoPath);
if (!autoMeansAlways) {
expect(monoInfo).to.be.undefined;
}
else {
expect(monoInfo.env["PATH"]).to.contain(join(monoPath, 'bin'));
expect(monoInfo.env["MONO_GAC_PREFIX"]).to.be.equal(monoPath);
}
});

test("sets the environment with the monoPath id useGlobalMono is always", async () => {
test("sets the environment with the monoPath id useGlobalMono is auto", async () => {
let monoResolver = new OmniSharpMonoResolver(getMono(requiredMonoVersion));
let monoInfo = await monoResolver.getGlobalMonoInfo({
...options,
useGlobalMono: "auto",
monoPath: monoPath
});

expect(monoInfo.env["PATH"]).to.contain(join(monoPath, 'bin'));
expect(monoInfo.env["MONO_GAC_PREFIX"]).to.be.equal(monoPath);
if (!autoMeansAlways) {
expect(monoInfo).to.be.undefined;
}
else {
expect(monoInfo.env["PATH"]).to.contain(join(monoPath, 'bin'));
expect(monoInfo.env["MONO_GAC_PREFIX"]).to.be.equal(monoPath);
}
});

test("doesn't set the environment with the monoPath if useGlobalMono is never", async () => {
Expand Down