-
Notifications
You must be signed in to change notification settings - Fork 420
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 Roslyn to 4.5.0-2.22527.10 #2486
Changes from all commits
31f0e17
02ab44f
dfb1d4f
4ab57e3
60c2ffd
dacd86b
91af9c8
9d798e8
14fcf91
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
<MicrosoftTestPackageVersion>17.3.0</MicrosoftTestPackageVersion> | ||
<MSBuildPackageVersion>17.3.1</MSBuildPackageVersion> | ||
<NuGetPackageVersion>6.4.0-preview.1.53</NuGetPackageVersion> | ||
<RoslynPackageVersion>4.4.0-3.22429.3</RoslynPackageVersion> | ||
<RoslynPackageVersion>4.5.0-2.22527.10</RoslynPackageVersion> | ||
<XunitPackageVersion>2.4.1</XunitPackageVersion> | ||
</PropertyGroup> | ||
|
||
|
@@ -59,6 +59,12 @@ | |
<PackageReference Update="Microsoft.VisualStudio.Setup.Configuration.Interop" Version="1.14.114" /> | ||
<PackageReference Update="Microsoft.VisualStudio.SDK.EmbedInteropTypes" Version="15.0.12" /> | ||
|
||
<!-- The two references below can be deleted once OmniSharp.Extensions.LanguageServer | ||
references Nerdbank.Streams version >= 2.9. The updated versions are needed for compatibility | ||
with Razor. --> | ||
<PackageReference Update="Microsoft.VisualStudio.Threading" Version="17.4.27" /> | ||
<PackageReference Update="Microsoft.VisualStudio.Validation" Version="17.0.64" /> | ||
|
||
<PackageReference Update="Newtonsoft.Json" Version="13.0.1" /> | ||
|
||
<PackageReference Update="NuGet.Common" Version="$(NuGetPackageVersion)" /> | ||
|
@@ -72,10 +78,10 @@ | |
<PackageReference Update="NuGet.Protocol" Version="$(NuGetPackageVersion)" /> | ||
<PackageReference Update="NuGet.Versioning" Version="$(NuGetPackageVersion)" /> | ||
|
||
<PackageReference Update="OmniSharp.Extensions.LanguageServer" Version="0.19.0" /> | ||
<PackageReference Update="OmniSharp.Extensions.LanguageProtocol.Testing" Version="0.19.0" /> | ||
<PackageReference Update="OmniSharp.Extensions.LanguageServer" Version="0.19.7" /> | ||
<PackageReference Update="OmniSharp.Extensions.LanguageProtocol.Testing" Version="0.19.7" /> | ||
|
||
<PackageReference Update="SQLitePCLRaw.bundle_green" Version="2.0.7" /> | ||
<PackageReference Update="SQLitePCLRaw.bundle_green" Version="2.1.0" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was seeing build warnings until I bumped this version |
||
<PackageReference Update="System.Collections.Immutable" Version="6.0.0" /> | ||
<PackageReference Update="System.ComponentModel.Composition" Version="4.5.0" /> | ||
<PackageReference Update="System.Composition" Version="6.0.0" /> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,8 +46,13 @@ internal static partial class CompletionListBuilder | |
bool hasAfterInsertStep = false; | ||
if (completion.IsComplexTextEdit) | ||
{ | ||
// The completion is somehow expensive. Currently, this one of two categories: import completion, or override/partial | ||
// completion. | ||
// To-do: Add support for snippet items: https://github.com/OmniSharp/omnisharp-roslyn/issues/2485 | ||
if (completion.GetProviderName() == SnippetCompletionProvider) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Including snippets seems to be causing duplicate items in the completion list, so skipping for now. |
||
{ | ||
continue; | ||
} | ||
|
||
// The completion is somehow expensive. Currently, this one of two categories: import completion or override/partial completion. | ||
Debug.Assert(completion.GetProviderName() is OverrideCompletionProvider or PartialMethodCompletionProvider | ||
or TypeImportCompletionProvider or ExtensionMethodImportCompletionProvider | ||
or AwaitCompletionProvider); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,6 @@ | |
using Microsoft.CodeAnalysis; | ||
using Microsoft.CodeAnalysis.Diagnostics; | ||
using OmniSharp.Models.Diagnostics; | ||
using OmniSharp.MSBuild; | ||
using OmniSharp.Roslyn.CSharp.Services.Diagnostics; | ||
using TestUtility; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
@@ -211,7 +209,7 @@ public async Task When_custom_rule_is_set_to_none_dont_return_results_at_all() | |
} | ||
} | ||
|
||
[Fact] | ||
[Fact(Skip = "https://github.com/dotnet/roslyn/issues/66085")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The underlying issue here has been fixed (thanks Manish!), however the fix is in a newer version of Roslyn, so skipping the test for now |
||
public async Task When_diagnostic_is_disabled_by_default_updating_rule_will_enable_it() | ||
{ | ||
using (var host = GetHost()) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,19 +30,21 @@ public class TestGeneratorReference : AnalyzerReference | |
{ | ||
private readonly bool _isEnabledByDefault; | ||
private readonly Action<GeneratorExecutionContext> _execute; | ||
private readonly ImmutableArray<ISourceGenerator> _generators; | ||
|
||
public TestGeneratorReference(Action<GeneratorExecutionContext> execute, [CallerMemberName] string testId = "", bool isEnabledByDefault = true) | ||
{ | ||
Id = testId; | ||
_isEnabledByDefault = isEnabledByDefault; | ||
_execute = execute; | ||
_generators = ImmutableArray.Create<ISourceGenerator>(new TestSourceGenerator(_execute)); | ||
} | ||
|
||
public override ImmutableArray<ISourceGenerator> GetGenerators(string language) | ||
=> ImmutableArray.Create<ISourceGenerator>(new TestSourceGenerator(_execute)); | ||
=> _generators; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This originally caused a test failure due to changes from dotnet/roslyn#64729. The fix is to not create a new generator each time these methods are called, and instead re-use the existing generator in order to maintain the same documentId. |
||
|
||
public override ImmutableArray<ISourceGenerator> GetGeneratorsForAllLanguages() | ||
=> ImmutableArray.Create<ISourceGenerator>(new TestSourceGenerator(_execute)); | ||
=> _generators; | ||
|
||
public override string FullPath => null; | ||
public override object Id { get; } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O#-roslyn and Razor both indirectly reference
Microsoft.VisualStudio.Validation
:OmniSharp.Extensions.LanguageServer
->OmniSharp.Extensions.JsonRpc
->Nerdbank.Streams
->Microsoft.VisualStudio.Threading
->Microsoft.VisualStudio.Validation
Microsoft.VisualStudio.Threading
->Microsoft.VisualStudio.Validation
Razor is on a 17.xx version of
Microsoft.VisualStudio.Validation
, while O#-roslyn is on a lower version. We need to bump O#-roslyn's version to avoid errors in Razor files. However, the newest version ofOmniSharp.Extensions.LanguageServer
only utilizes a Validation version of 16.xx, so we have to bump explicitly until they update to a newer version.