Skip to content

Commit

Permalink
Merge main to VBOverloadResolutionPriority (#75876)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekseyTs authored Nov 12, 2024
2 parents 32f7283 + 30f5e30 commit 3fd0638
Show file tree
Hide file tree
Showing 35 changed files with 6,011 additions and 4,702 deletions.
63 changes: 32 additions & 31 deletions eng/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<_BasicReferenceAssembliesVersion>1.7.9</_BasicReferenceAssembliesVersion>
<!-- CodeStyleAnalyzerVersion should we updated together with version of dotnet-format in dotnet-tools.json -->
<CodeStyleAnalyzerVersion>4.8.0-3.final</CodeStyleAnalyzerVersion>
<VisualStudioEditorPackagesVersion>17.10.191</VisualStudioEditorPackagesVersion>
<VisualStudioEditorPackagesVersion>17.12.145-preview</VisualStudioEditorPackagesVersion>
<ILAsmPackageVersion>9.0.0-rc.2.24462.10</ILAsmPackageVersion>
<ILDAsmPackageVersion>6.0.0-rtm.21518.12</ILDAsmPackageVersion>
<MicrosoftILVerificationVersion>7.0.0-alpha.1.22060.1</MicrosoftILVerificationVersion>
Expand Down Expand Up @@ -46,10 +46,10 @@
</ItemGroup>

<ItemGroup Condition="'$(DotNetBuildSourceOnly)' != 'true' and '$(TargetFramework)' == 'net472'">
<PackageVersion Include="Microsoft.Build" Version="17.10.4" />
<PackageVersion Include="Microsoft.Build.Framework" Version="17.10.4" />
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="17.10.4" />
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.10.4" />
<PackageVersion Include="Microsoft.Build" Version="17.12.0-preview-24426-07" />
<PackageVersion Include="Microsoft.Build.Framework" Version="17.12.0-preview-24426-07" />
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="17.12.0-preview-24426-07" />
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.12.0-preview-24426-07" />
</ItemGroup>

<ItemGroup>
Expand All @@ -58,7 +58,7 @@
<!--
Visual Studio
-->
<PackageVersion Include="Microsoft.VisualStudio.SDK" Version="17.10.234-preview.1" />
<PackageVersion Include="Microsoft.VisualStudio.SDK" Version="17.12.39557-preview.2.1" />
<PackageVersion Include="Microsoft.Internal.VisualStudio.Shell.Framework" Version="17.9.36524" />
<PackageVersion Include="Microsoft.ServiceHub.Client" Version="4.2.1017" />
<PackageVersion Include="Microsoft.VisualStudio.Extensibility" Version="$(MicrosoftVisualStudioExtensibilityVersion)" />
Expand Down Expand Up @@ -91,32 +91,33 @@

<!--
Subset of Microsoft.VisualStudio.Sdk meta-package (run `csi generate-vssdk-versions.csx` to update based on VSSDK meta-package).
See https://github.com/dotnet/arcade/blob/main/Documentation/MirroringPackages.md if any of these packages fail to restore.
-->
<PackageVersion Include="Microsoft.ServiceHub.Framework" Version="4.5.31" />
<PackageVersion Include="Microsoft.VisualStudio.Composition" Version="17.10.37" />
<PackageVersion Include="Microsoft.VisualStudio.Composition.Analyzers" Version="17.10.37" />
<PackageVersion Include="Microsoft.VisualStudio.CoreUtility" Version="17.10.191" />
<PackageVersion Include="Microsoft.VisualStudio.Editor" Version="17.10.191" />
<PackageVersion Include="Microsoft.VisualStudio.ImageCatalog" Version="17.10.40170" />
<PackageVersion Include="Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime" Version="17.10.40152" />
<PackageVersion Include="Microsoft.VisualStudio.Language" Version="17.10.191" />
<PackageVersion Include="Microsoft.VisualStudio.Language.NavigateTo.Interfaces" Version="17.10.191" />
<PackageVersion Include="Microsoft.VisualStudio.Language.StandardClassification" Version="17.10.191" />
<PackageVersion Include="Microsoft.VisualStudio.LanguageServer.Client" Version="17.10.124" />
<PackageVersion Include="Microsoft.ServiceHub.Framework" Version="4.7.32-beta" />
<PackageVersion Include="Microsoft.VisualStudio.Composition" Version="17.12.17-preview" />
<PackageVersion Include="Microsoft.VisualStudio.Composition.Analyzers" Version="17.12.17-preview" />
<PackageVersion Include="Microsoft.VisualStudio.CoreUtility" Version="17.12.145-preview" />
<PackageVersion Include="Microsoft.VisualStudio.Editor" Version="17.12.145-preview" />
<PackageVersion Include="Microsoft.VisualStudio.ImageCatalog" Version="17.12.39557-preview.2.1" />
<PackageVersion Include="Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime" Version="17.12.39557-preview.2.1" />
<PackageVersion Include="Microsoft.VisualStudio.Language" Version="17.12.145-preview" />
<PackageVersion Include="Microsoft.VisualStudio.Language.NavigateTo.Interfaces" Version="17.12.145-preview" />
<PackageVersion Include="Microsoft.VisualStudio.Language.StandardClassification" Version="17.12.145-preview" />
<PackageVersion Include="Microsoft.VisualStudio.LanguageServer.Client" Version="17.12.39-preview" />
<PackageVersion Include="Microsoft.VisualStudio.RemoteControl" Version="16.3.52" />
<PackageVersion Include="Microsoft.VisualStudio.RpcContracts" Version="17.10.21" />
<PackageVersion Include="Microsoft.VisualStudio.Shell.15.0" Version="17.10.40170" />
<PackageVersion Include="Microsoft.VisualStudio.Telemetry" Version="17.13.14" />
<PackageVersion Include="Microsoft.VisualStudio.Text.Data" Version="17.10.191" />
<PackageVersion Include="Microsoft.VisualStudio.Text.Logic" Version="17.10.191" />
<PackageVersion Include="Microsoft.VisualStudio.Text.UI" Version="17.10.191" />
<PackageVersion Include="Microsoft.VisualStudio.Text.UI.Wpf" Version="17.10.191" />
<PackageVersion Include="Microsoft.VisualStudio.Threading" Version="17.11.20" />
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.11.20" />
<PackageVersion Include="Microsoft.VisualStudio.Utilities.Internal" Version="16.3.90" />
<PackageVersion Include="Nerdbank.Streams" Version="2.10.69" />
<PackageVersion Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
<PackageVersion Include="StreamJsonRpc" Version="2.18.48" />
<PackageVersion Include="Microsoft.VisualStudio.RpcContracts" Version="17.12.11-preview" />
<PackageVersion Include="Microsoft.VisualStudio.Shell.15.0" Version="17.12.39557-preview.2.1" />
<PackageVersion Include="Microsoft.VisualStudio.Telemetry" Version="17.12.32" />
<PackageVersion Include="Microsoft.VisualStudio.Text.Data" Version="17.12.145-preview" />
<PackageVersion Include="Microsoft.VisualStudio.Text.Logic" Version="17.12.145-preview" />
<PackageVersion Include="Microsoft.VisualStudio.Text.UI" Version="17.12.145-preview" />
<PackageVersion Include="Microsoft.VisualStudio.Text.UI.Wpf" Version="17.12.145-preview" />
<PackageVersion Include="Microsoft.VisualStudio.Threading" Version="17.12.13-preview" />
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.12.13-preview" />
<PackageVersion Include="Microsoft.VisualStudio.Utilities.Internal" Version="16.3.73" />
<PackageVersion Include="Nerdbank.Streams" Version="2.11.79" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="StreamJsonRpc" Version="2.20.8-beta" />

<!--
VS Debugger
Expand Down Expand Up @@ -319,7 +320,7 @@
Infra
-->
<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageVersion Include="MSBuild.StructuredLogger" Version="2.2.169" />
<PackageVersion Include="MSBuild.StructuredLogger" Version="2.2.386" />
<PackageVersion Include="Mono.Options" Version="6.6.0.161" />
<PackageVersion Include="RichCodeNav.EnvVarDump" Version="0.1.1643-alpha" />
<PackageVersion Include="Roslyn.Diagnostics.Analyzers" Version="$(RoslynDiagnosticsNugetPackageVersion)" />
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<SystemDiagnosticsEventLogVersion>8.0.0</SystemDiagnosticsEventLogVersion>
<SystemCollectionsImmutableVersion>8.0.0</SystemCollectionsImmutableVersion>
<SystemComponentModelCompositionVersion>8.0.0</SystemComponentModelCompositionVersion>
<SystemDiagnosticsDiagnosticSourceVersion>8.0.0</SystemDiagnosticsDiagnosticSourceVersion>
<SystemDiagnosticsDiagnosticSourceVersion>8.0.1</SystemDiagnosticsDiagnosticSourceVersion>
<SystemIOHashingVersion>8.0.0</SystemIOHashingVersion>
<SystemIOPipelinesVersion>8.0.0</SystemIOPipelinesVersion>
<SystemReflectionMetadataVersion>8.0.0</SystemReflectionMetadataVersion>
Expand Down
1 change: 0 additions & 1 deletion src/Analyzers/CSharp/CodeFixes/CSharpCodeFixes.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@
<Compile Include="$(MSBuildThisFileDirectory)RemoveUnusedMembers\CSharpRemoveUnusedMembersCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SimplifyInterpolation\CSharpSimplifyInterpolationCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SimplifyLinqExpression\CSharpSimplifyLinqExpressionCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SimplifyPropertyPattern\CSharpSimplifyPropertyPatternCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider.cs" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.CSharp.SimplifyLinqExpression;
using Microsoft.CodeAnalysis.Editor.UnitTests.CodeActions;
using Microsoft.CodeAnalysis.SimplifyLinqExpression;
using Microsoft.CodeAnalysis.Test.Utilities;
using Xunit;

namespace Microsoft.CodeAnalysis.CSharp.Analyzers.UnitTests.SimplifyLinqExpression;

using VerifyCS = CSharpCodeFixVerifier<
CSharpSimplifyLinqExpressionDiagnosticAnalyzer,
CSharpSimplifyLinqExpressionCodeFixProvider>;
SimplifyLinqExpressionCodeFixProvider>;

[Trait(Traits.Feature, Traits.Features.CodeActionsInlineDeclaration)]
public partial class CSharpSimplifyLinqExpressionTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.CSharp.SimplifyLinqExpression;
using Microsoft.CodeAnalysis.Editor.UnitTests.CodeActions;
using Microsoft.CodeAnalysis.SimplifyLinqExpression;
using Microsoft.CodeAnalysis.Test.Utilities;
using Roslyn.Test.Utilities;
using Xunit;

namespace Microsoft.CodeAnalysis.CSharp.Analyzers.UnitTests.SimplifyLinqExpression;

using VerifyCS = CSharpCodeFixVerifier<
CSharpSimplifyLinqExpressionDiagnosticAnalyzer,
CSharpSimplifyLinqExpressionCodeFixProvider>;
SimplifyLinqExpressionCodeFixProvider>;

[Trait(Traits.Feature, Traits.Features.CodeActionsSimplifyLinqExpression)]
public partial class CSharpSimplifyLinqExpressionTests
public sealed partial class CSharpSimplifyLinqExpressionTests
{
[Theory, CombinatorialData]
public static async Task TestAllowedMethodTypes(
Expand Down Expand Up @@ -525,4 +527,40 @@ void Main()
""";
await VerifyCS.VerifyAnalyzerAsync(source);
}

[Fact, WorkItem("https://github.com/dotnet/roslyn/issues/52283")]
public static async Task TestTrivia1()
{
await new VerifyCS.Test
{
TestCode = """
using System;
using System.Linq;
using System.Collections.Generic;
class C
{
static void Main(string[] args)
{
var v = [|args.Skip(1)
.Where(a => a.Length == 1).Count()|];
}
}
""",
FixedCode = """
using System;
using System.Linq;
using System.Collections.Generic;
class C
{
static void Main(string[] args)
{
var v = args.Skip(1)
.Count(a => a.Length == 1);
}
}
"""
}.RunAsync();
}
}
4 changes: 3 additions & 1 deletion src/Analyzers/Core/Analyzers/Analyzers.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)AnalyzersResources.resx" GenerateSource="true" Link="AnalyzersResources.resx" />
<None Include="$(MSBuildThisFileDirectory)AnalyzersResources.resx" />
<None Include="$(MSBuildThisFileDirectory)AnalyzersResources.resx">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer.cs" />
Expand Down
2 changes: 1 addition & 1 deletion src/Analyzers/Core/CodeFixes/CodeFixes.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
<Compile Include="$(MSBuildThisFileDirectory)RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SimplifyBooleanExpression\SimplifyConditionalCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SimplifyInterpolation\AbstractSimplifyInterpolationCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SimplifyLinqExpression\AbstractSimplifyLinqExpressionCodeFixProvider`3.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SimplifyLinqExpression\SimplifyLinqExpressionCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UpgradeProject\AbstractUpgradeProjectCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullStatementCheckCodeFixProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UseCoalesceExpression\UseCoalesceExpressionForTernaryConditionalCheckCodeFixProvider.cs" />
Expand Down

This file was deleted.

Loading

0 comments on commit 3fd0638

Please sign in to comment.