Skip to content
Closed
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
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<WarningsAsErrors>nullable</WarningsAsErrors>` ([#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))
Expand Down
2 changes: 1 addition & 1 deletion build/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<MicrosoftTestPackageVersion>17.2.0</MicrosoftTestPackageVersion>
<MSBuildPackageVersion>17.0.0</MSBuildPackageVersion>
<NuGetPackageVersion>6.3.0-preview.1.32</NuGetPackageVersion>
<RoslynPackageVersion>4.3.0-2.22267.5</RoslynPackageVersion>
<RoslynPackageVersion>4.3.0-3.22329.4</RoslynPackageVersion>
<XunitPackageVersion>2.4.1</XunitPackageVersion>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ await Client.ExecuteCommand(Command.Create("omnisharp/executeCodeAction")
internal class Z
{
}
}".Replace("\r\n", "\n"), updateDocumentText.ToString());
}", updateDocumentText.ToString());
}

[Theory]
Expand Down
2 changes: 1 addition & 1 deletion tests/OmniSharp.Roslyn.CSharp.Tests/CodeActionsV2Facts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
52 changes: 29 additions & 23 deletions tests/OmniSharp.Roslyn.CSharp.Tests/CompletionFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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));
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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()
{
Expand Down