diff --git a/CHANGELOG.md b/CHANGELOG.md index ebacaafdeb..8a951d6e8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,14 +2,18 @@ All changes to the project will be documented in this file. ## [1.39.1] +* Update Roslyn to 4.3.0-3.22329.4 (PR: [#2416](https://github.com/OmniSharp/omnisharp-roslyn/pull/2416)) +* Return meaningful error when pinned SDK version is not found. ([[omnisharp-vscode#5128](https://github.com/OmniSharp/omnisharp-vscode/issues/5128), PR: [#2403](https://github.com/OmniSharp/omnisharp-roslyn/pull/2403)) * Added support for `nullable` ([#2292](https://github.com/OmniSharp/omnisharp-roslyn/issues/2292), PR: [#2406](https://github.com/OmniSharp/omnisharp-roslyn/pull/2406)) +* Removed nuget versioning reference from OmniSharp.Abstractions ([#2410](https://github.com/OmniSharp/omnisharp-roslyn/issues/2410), PR: [#2414](https://github.com/OmniSharp/omnisharp-roslyn/pull/2414)) +* Bump Newtonsoft.Json to 13.0.1 (PR: [#2415](https://github.com/OmniSharp/omnisharp-roslyn/pull/2415)) ## [1.39.0] - 2022-05-19 * Update Roslyn to 4.3.0-2.22267.5 (PR: [#2401](https://github.com/OmniSharp/omnisharp-roslyn/pull/2401)) -* Fixed run script for Mono ([OmniSharp/omnisharp-vscode#5181](https://github.com/OmniSharp/omnisharp-vscode/issues/5181), [OmniSharp/omnisharp-vscode#5179](https://github.com/OmniSharp/omnisharp-vscode/issues/5179), PR: [#2398](https://github.com/OmniSharp/omnisharp-roslyn/pull/2398)) +* Fixed run script for Mono ([omnisharp-vscode#5181](https://github.com/OmniSharp/omnisharp-vscode/issues/5181), [omnisharp-vscode#5179](https://github.com/OmniSharp/omnisharp-vscode/issues/5179), PR: [#2398](https://github.com/OmniSharp/omnisharp-roslyn/pull/2398)) * Fall back to /usr/lib/os-release if /etc/os-release doesn't exist (PR: [#2380](https://github.com/OmniSharp/omnisharp-roslyn/pull/2380)) * Added support for linux-musl-x64 and linux-musl-arm64 ([#2366](https://github.com/OmniSharp/omnisharp-roslyn/issues/2366), PR: [#2395](https://github.com/OmniSharp/omnisharp-roslyn/pull/2395)) -* Enable GoToDefinition for symbols in metadata documents ([OmniSharp/omnisharp-vscode#4818](https://github.com/OmniSharp/omnisharp-vscode/issues/4818), PR: [#2390](https://github.com/OmniSharp/omnisharp-roslyn/pull/2390)) +* Enable GoToDefinition for symbols in metadata documents ([omnisharp-vscode#4818](https://github.com/OmniSharp/omnisharp-vscode/issues/4818), PR: [#2390](https://github.com/OmniSharp/omnisharp-roslyn/pull/2390)) * Use human readable doc in lsp's signature help ([#2372](https://github.com/OmniSharp/omnisharp-roslyn/issues/2372), PR: [#2392](https://github.com/OmniSharp/omnisharp-roslyn/pull/2392)) * Add TextEdits support to InlayHints (PR: [#2385](https://github.com/OmniSharp/omnisharp-roslyn/pull/2385)) * Fix Equals of AutoCompleteResponse and simplify some code (PR: [#2362](https://github.com/OmniSharp/omnisharp-roslyn/pull/2362)) diff --git a/build/Packages.props b/build/Packages.props index 12fca60087..7b8f8e3e47 100644 --- a/build/Packages.props +++ b/build/Packages.props @@ -7,7 +7,7 @@ 17.2.0 17.0.0 6.3.0-preview.1.32 - 4.3.0-2.22267.5 + 4.3.0-3.22329.4 2.4.1 diff --git a/tests/OmniSharp.Lsp.Tests/OmniSharpCodeActionHandlerFacts.cs b/tests/OmniSharp.Lsp.Tests/OmniSharpCodeActionHandlerFacts.cs index de4271037b..674c960f1e 100644 --- a/tests/OmniSharp.Lsp.Tests/OmniSharpCodeActionHandlerFacts.cs +++ b/tests/OmniSharp.Lsp.Tests/OmniSharpCodeActionHandlerFacts.cs @@ -252,7 +252,7 @@ await Client.ExecuteCommand(Command.Create("omnisharp/executeCodeAction") internal class Z { } -}".Replace("\r\n", "\n"), updateDocumentText.ToString()); +}", updateDocumentText.ToString()); } [Theory] diff --git a/tests/OmniSharp.Roslyn.CSharp.Tests/CodeActionsV2Facts.cs b/tests/OmniSharp.Roslyn.CSharp.Tests/CodeActionsV2Facts.cs index b4735cf372..3a5fa89b2f 100644 --- a/tests/OmniSharp.Roslyn.CSharp.Tests/CodeActionsV2Facts.cs +++ b/tests/OmniSharp.Roslyn.CSharp.Tests/CodeActionsV2Facts.cs @@ -236,7 +236,7 @@ public async Task Can_generate_type_and_return_name_of_new_file(bool roslynAnaly internal class Z { } -}".Replace("\r\n", "\n"), ((ModifiedFileResponse)changes[0]).Changes.First().NewText); +}", ((ModifiedFileResponse)changes[0]).Changes.First().NewText); Assert.NotNull(changes[1].FileName); } diff --git a/tests/OmniSharp.Roslyn.CSharp.Tests/CompletionFacts.cs b/tests/OmniSharp.Roslyn.CSharp.Tests/CompletionFacts.cs index 9d2fc512b9..074ef731fc 100644 --- a/tests/OmniSharp.Roslyn.CSharp.Tests/CompletionFacts.cs +++ b/tests/OmniSharp.Roslyn.CSharp.Tests/CompletionFacts.cs @@ -649,7 +649,7 @@ class FooChild : Foo var afterInsert = await AfterInsertResponse(completions.Items[0], host); var change = afterInsert.Changes.Single(); - Assert.Equal("public override bool Equals(object obj)\n {\n return base.Equals(obj);\n }", change.NewText); + Assert.Equal(NormalizeNewlines("public override bool Equals(object obj)\n {\n return base.Equals(obj);\n }"), change.NewText); Assert.Equal(8, change.StartLine); Assert.Equal(4, change.StartColumn); Assert.Equal(8, change.EndLine); @@ -685,13 +685,15 @@ class FooChild : Foo completions.Items.Select(c => c.Label)); #endif - Assert.Equal(new[] { "public override bool Equals(object obj)\n {\n return base.Equals(obj);$0\n \\}", - "public override int GetHashCode()\n {\n return base.GetHashCode();$0\n \\}", - "public override void Test(string text)\n {\n base.Test(text);$0\n \\}", - "public override void Test(string text, string moreText)\n {\n base.Test(text, moreText);$0\n \\}", - "public override string ToString()\n {\n return base.ToString();$0\n \\}" - }, - completions.Items.Select(c => c.TextEdit.NewText)); + Assert.Equal(new[] + { + NormalizeNewlines("public override bool Equals(object obj)\n {\n return base.Equals(obj);$0\n \\}"), + NormalizeNewlines("public override int GetHashCode()\n {\n return base.GetHashCode();$0\n \\}"), + NormalizeNewlines("public override void Test(string text)\n {\n base.Test(text);$0\n \\}"), + NormalizeNewlines("public override void Test(string text, string moreText)\n {\n base.Test(text, moreText);$0\n \\}"), + NormalizeNewlines("public override string ToString()\n {\n return base.ToString();$0\n \\}") + }, + completions.Items.Select(c => c.TextEdit.NewText)); Assert.Equal(new[] { "override Equals", "override GetHashCode", @@ -756,7 +758,7 @@ class CN3 : IN2 var afterInsert = await AfterInsertResponse(completions.Items.First(i => i.Label == "GetN1()"), host); var change = afterInsert.Changes.Single(); - Assert.Equal("protected override N1.CN1 GetN1()\n {\n throw new System.NotImplementedException();\n }", + Assert.Equal(NormalizeNewlines("protected override N1.CN1 GetN1()\n {\n throw new System.NotImplementedException();\n }"), change.NewText); Assert.Equal(15, change.StartLine); Assert.Equal(8, change.StartColumn); @@ -957,11 +959,13 @@ override Eq$$ completions.Items.Select(c => c.Label)); #endif - Assert.Equal(new[] { "public override bool Equals(object obj)\n {\n return base.Equals(obj);$0\n \\}", - "public override int GetHashCode()\n {\n return base.GetHashCode();$0\n \\}", - "public override string ToString()\n {\n return base.ToString();$0\n \\}" - }, - completions.Items.Select(c => c.TextEdit.NewText)); + Assert.Equal(new[] + { + NormalizeNewlines("public override bool Equals(object obj)\n {\n return base.Equals(obj);$0\n \\}"), + NormalizeNewlines("public override int GetHashCode()\n {\n return base.GetHashCode();$0\n \\}"), + NormalizeNewlines("public override string ToString()\n {\n return base.ToString();$0\n \\}") + }, + completions.Items.Select(c => c.TextEdit.NewText)); Assert.All(completions.Items.Select(c => c.AdditionalTextEdits), a => Assert.Null(a)); Assert.All(completions.Items, c => Assert.Equal(InsertTextFormat.Snippet, c.InsertTextFormat)); } @@ -1235,7 +1239,7 @@ public class Derived : Base var afterInsert = await AfterInsertResponse(completions.Items[0], host); var change = afterInsert.Changes.Single(); - Assert.Equal("public override bool Equals(object obj)\n {\n return base.Equals(obj);\n }", change.NewText); + Assert.Equal(NormalizeNewlines("public override bool Equals(object obj)\n {\n return base.Equals(obj);\n }"), change.NewText); Assert.Equal(9, change.StartLine); Assert.Equal(4, change.StartColumn); Assert.Equal(9, change.EndLine); @@ -1398,7 +1402,7 @@ partial class C var afterInsert = await AfterInsertResponse(completions.Items[0], host); var change = afterInsert.Changes.Single(); - Assert.Equal("void M1(string param)\n {\n throw new System.NotImplementedException();\n }", change.NewText); + Assert.Equal(NormalizeNewlines("void M1(string param)\n {\n throw new System.NotImplementedException();\n }"), change.NewText); Assert.Equal(7, change.StartLine); Assert.Equal(12, change.StartColumn); Assert.Equal(7, change.EndLine); @@ -1627,11 +1631,13 @@ override Ge$$ completions.Items.Select(c => c.Label)); #endif - Assert.Equal(new[] { "public override bool Equals(object obj)\n {\n return base.Equals(obj);$0\n \\}", - "public override int GetHashCode()\n {\n return base.GetHashCode();$0\n \\}", - "public override string ToString()\n {\n return base.ToString();$0\n \\}" - }, - completions.Items.Select(c => c.TextEdit.NewText)); + Assert.Equal(new[] + { + NormalizeNewlines("public override bool Equals(object obj)\n {\n return base.Equals(obj);$0\n \\}"), + NormalizeNewlines("public override int GetHashCode()\n {\n return base.GetHashCode();$0\n \\}"), + NormalizeNewlines("public override string ToString()\n {\n return base.ToString();$0\n \\}") + }, + completions.Items.Select(c => c.TextEdit.NewText)); Assert.Equal(new[] { "override Equals", "override GetHashCode", @@ -2229,9 +2235,9 @@ public async Task TestOverrideWithTrailingWhitespacePrior(string filename) namespace N { internal class C - { + { // The trailing tabs on the previous line and the next line are integral to this bug - + override $$ public C() {