Skip to content

Commit 7b491a9

Browse files
committed
Update RDG to use interceptors feature
1 parent 8b2fd3f commit 7b491a9

File tree

63 files changed

+7876
-8313
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+7876
-8313
lines changed

eng/SourceBuildPrebuiltBaseline.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<UsagePattern IdentityGlob="Microsoft.CodeAnalysis.CSharp/*3.3.1*" />
2121
<UsagePattern IdentityGlob="Microsoft.CodeAnalysis.CSharp.Workspaces/*3.3.1*" />
2222
<UsagePattern IdentityGlob="Microsoft.CodeAnalysis.Workspaces.Common/*3.3.1*" />
23-
<UsagePattern IdentityGlob="System.Composition/*1.0.31*" />
23+
<UsagePattern IdentityGlob="System.Composition/*7.0.0*" />
2424
<UsagePattern IdentityGlob="System.Threading.Tasks.Extensions/*4.5.3*" />
2525

2626
<!-- Added to unblock dependency flow, needs review. -->

eng/Version.Details.xml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,11 @@
194194
<Sha>0d04efdab9f26bad07edc881dc7fa088337b8562</Sha>
195195
<SourceBuild RepoName="source-build-externals" ManagedOnly="true" />
196196
</Dependency>
197+
<Dependency Name="Microsoft.SourceBuild.Intermediate.symreader" Version="2.0.0-beta-23228-03">
198+
<Uri>https://github.com/dotnet/symreader</Uri>
199+
<Sha>27e584661980ee6d82c419a2a471ae505b7d122e</Sha>
200+
<SourceBuild RepoName="symreader" ManagedOnly="true" />
201+
</Dependency>
197202
<Dependency Name="System.Configuration.ConfigurationManager" Version="8.0.0-preview.7.23354.1">
198203
<Uri>https://github.com/dotnet/runtime</Uri>
199204
<Sha>f8cb3c760030ec9443d0d01d3f3ffd31fb92d9f7</Sha>
@@ -335,22 +340,22 @@
335340
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
336341
</Dependency>
337342
<!-- Not updated automatically -->
338-
<Dependency Name="Microsoft.CodeAnalysis.Common" Version="4.4.0-4.22520.2">
343+
<Dependency Name="Microsoft.CodeAnalysis.Common" Version="4.7.0-3.23314.3">
339344
<Uri>https://github.com/dotnet/roslyn</Uri>
340-
<Sha>65df6b1065bae316232a6c9907a8be995302fb5e</Sha>
345+
<Sha>1aa759af23d2a29043ea44fcef5bd6823dafa5d0</Sha>
341346
<SourceBuild RepoName="roslyn" ManagedOnly="true" />
342347
</Dependency>
343-
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.AspNetCore" Version="4.4.0-4.22520.2">
348+
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.AspNetCore" Version="4.7.0-3.23314.3">
344349
<Uri>https://github.com/dotnet/roslyn</Uri>
345-
<Sha>65df6b1065bae316232a6c9907a8be995302fb5e</Sha>
350+
<Sha>1aa759af23d2a29043ea44fcef5bd6823dafa5d0</Sha>
346351
</Dependency>
347-
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.4.0-4.22520.2">
352+
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.7.0-3.23314.3">
348353
<Uri>https://github.com/dotnet/roslyn</Uri>
349-
<Sha>65df6b1065bae316232a6c9907a8be995302fb5e</Sha>
354+
<Sha>1aa759af23d2a29043ea44fcef5bd6823dafa5d0</Sha>
350355
</Dependency>
351-
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.4.0-4.22520.2">
356+
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.7.0-3.23314.3">
352357
<Uri>https://github.com/dotnet/roslyn</Uri>
353-
<Sha>65df6b1065bae316232a6c9907a8be995302fb5e</Sha>
358+
<Sha>1aa759af23d2a29043ea44fcef5bd6823dafa5d0</Sha>
354359
</Dependency>
355360
</ProductDependencies>
356361
<ToolsetDependencies>

eng/Versions.props

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@
146146
<MicrosoftEntityFrameworkCoreVersion>8.0.0-preview.7.23354.1</MicrosoftEntityFrameworkCoreVersion>
147147
<MicrosoftEntityFrameworkCoreDesignVersion>8.0.0-preview.7.23354.1</MicrosoftEntityFrameworkCoreDesignVersion>
148148
<!-- Packages from dotnet/roslyn -->
149-
<MicrosoftCodeAnalysisCommonVersion>4.4.0-4.22520.2</MicrosoftCodeAnalysisCommonVersion>
150-
<MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>4.4.0-4.22520.2</MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>
151-
<MicrosoftCodeAnalysisCSharpVersion>4.4.0-4.22520.2</MicrosoftCodeAnalysisCSharpVersion>
152-
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.4.0-4.22520.2</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
149+
<MicrosoftCodeAnalysisCommonVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisCommonVersion>
150+
<MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>
151+
<MicrosoftCodeAnalysisCSharpVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisCSharpVersion>
152+
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
153153
<!-- Packages from NuGet/Nuget.client -->
154154
<!-- If you update these versions, make sure to also update https://github.com/dotnet/aspnetcore/blob/main/eng/SourceBuildPrebuiltBaseline.xml -->
155155
<NuGetPackagingVersion>6.2.4</NuGetPackagingVersion>
@@ -165,6 +165,8 @@
165165
<MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>8.0.0-alpha.1.23319.1</MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>
166166
<!-- Packages from dotnet/source-build-reference-packages -->
167167
<MicrosoftSourceBuildIntermediatesourcebuildreferencepackagesVersion>8.0.0-alpha.1.23326.1</MicrosoftSourceBuildIntermediatesourcebuildreferencepackagesVersion>
168+
<!-- Packages from dotnet/symreader -->
169+
<MicrosoftSourceBuildIntermediatesymreaderVersion>2.0.0-beta-23228-03</MicrosoftSourceBuildIntermediatesymreaderVersion>
168170
<!-- Packages from dotnet/xdt -->
169171
<MicrosoftWebXdtVersion>7.0.0-preview.22423.2</MicrosoftWebXdtVersion>
170172
</PropertyGroup>
@@ -241,11 +243,11 @@
241243
<Analyzer_MicrosoftCodeAnalysisCSharpWorkspacesVersion>3.3.1</Analyzer_MicrosoftCodeAnalysisCSharpWorkspacesVersion>
242244
<!-- Pin the version of the M.CA dependencies that we utilize with a cutom version property $(MicrosoftCodeAnalysisVersion_LatestVS) to avoid automatically
243245
consuming the newest version of the packages when using the $(MicrosoftCodeAnalysisCSharpVersion) properties in source-build. -->
244-
<MicrosoftCodeAnalysisVersion_LatestVS>4.5.0</MicrosoftCodeAnalysisVersion_LatestVS>
245-
<MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>4.4.0-4.22520.2</MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>
246-
<MicrosoftCodeAnalysisCommonVersion>4.4.0-4.22520.2</MicrosoftCodeAnalysisCommonVersion>
247-
<MicrosoftCodeAnalysisCSharpVersion>4.4.0-4.22520.2</MicrosoftCodeAnalysisCSharpVersion>
248-
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.4.0-4.22520.2</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
246+
<MicrosoftCodeAnalysisVersion_LatestVS>4.7.0-3.23314.3</MicrosoftCodeAnalysisVersion_LatestVS>
247+
<MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>
248+
<MicrosoftCodeAnalysisCommonVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisCommonVersion>
249+
<MicrosoftCodeAnalysisCSharpVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisCSharpVersion>
250+
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
249251
<MicrosoftCodeAnalysisPublicApiAnalyzersVersion>3.3.3</MicrosoftCodeAnalysisPublicApiAnalyzersVersion>
250252
<MicrosoftCodeAnalysisCSharpAnalyzerTestingXUnitVersion>1.1.2-beta1.22531.1</MicrosoftCodeAnalysisCSharpAnalyzerTestingXUnitVersion>
251253
<MicrosoftCodeAnalysisCSharpCodeFixTestingXUnitVersion>1.1.2-beta1.22531.1</MicrosoftCodeAnalysisCSharpCodeFixTestingXUnitVersion>

src/Framework/AspNetCoreAnalyzers/src/Analyzers/Microsoft.AspNetCore.App.Analyzers.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<Nullable>Enable</Nullable>
99
<RootNamespace>Microsoft.AspNetCore.Analyzers</RootNamespace>
1010
<SuppressNullableAttributesImport>true</SuppressNullableAttributesImport>
11+
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
1112
</PropertyGroup>
1213

1314
<ItemGroup>

src/Framework/AspNetCoreAnalyzers/src/Analyzers/Resources.resx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@
211211
<value>Route handler has multiple parameters with the [FromBody] attribute or a parameter with an [AsParameters] attribute where the parameter type contains multiple members with [FromBody] attributes. Only one parameter can have a [FromBody] attribute.</value>
212212
</data>
213213
<data name="Analyzer_MultipleFromBody_Title" xml:space="preserve">
214-
<value>Route handler has multiple parameters with the [FromBody] attribute.</value>
214+
<value>Route handler has multiple parameters with the [FromBody] attribute</value>
215215
</data>
216216
<data name="Analyzer_DoNotUseModelBindingAttributesOnRouteHandlerParameters_Title" xml:space="preserve">
217217
<value>Do not use model binding attributes with route handlers</value>
@@ -289,10 +289,10 @@
289289
<value>Complex types referenced by route parameters must be parsable</value>
290290
</data>
291291
<data name="Analyzer_RouteParameterComplexTypeIsNotParsable_Message" xml:space="preserve">
292-
<value>Parameter '{0}' of type {1} should define a bool TryParse(string, IFormatProvider, out {1}) method, or implement IParsable&lt;{1}&gt;.</value>
292+
<value>Parameter '{0}' of type {1} should define a bool TryParse(string, IFormatProvider, out {1}) method, or implement IParsable&lt;{1}&gt;</value>
293293
</data>
294294
<data name="Analyzer_BindAsyncSignatureMustReturnValueTaskOfT_Title" xml:space="preserve">
295-
<value>When implementing BindAsync(...) method, the return type must be ValueTask&lt;T&gt;.</value>
295+
<value>When implementing BindAsync(...) method, the return type must be ValueTask&lt;T&gt;</value>
296296
</data>
297297
<data name="Analyzer_BindAsyncSignatureMustReturnValueTaskOfT_Message" xml:space="preserve">
298298
<value>Parameter '{0}' of type {1} has a BindAsync(...) method, but the return type is not ValueTask&lt;{1}&gt;. Consider implementing IBindableFromHttpContext&lt;{1}&gt; to enforce implementation.</value>
@@ -310,7 +310,7 @@
310310
<value>Route '{0}' conflicts with another action route. An HTTP request that matches multiple routes results in an ambiguous match error. Fix the conflict by changing the route's pattern, HTTP method, or route constraints.</value>
311311
</data>
312312
<data name="Analyzer_UseAddAuthorizationBuilder_Message" xml:space="preserve">
313-
<value>Use AddAuthorizationBuilder to register authorization services and construct policies.</value>
313+
<value>Use AddAuthorizationBuilder to register authorization services and construct policies</value>
314314
</data>
315315
<data name="Analyzer_UseAddAuthorizationBuilder_Title" xml:space="preserve">
316316
<value>Use AddAuthorizationBuilder</value>

src/Framework/AspNetCoreAnalyzers/test/Microsoft.AspNetCore.App.Analyzers.Test.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
55
<PreserveCompilationContext>true</PreserveCompilationContext>
66
<RootNamespace>Microsoft.AspNetCore.Analyzers</RootNamespace>
7+
<!-- Disable analyzer warnings for analyzers in test project. -->
8+
<NoWarn>$(NoWarn);RS1036;RS2008</NoWarn>
79
</PropertyGroup>
810

911
<ItemGroup>

src/Framework/AspNetCoreAnalyzers/test/RouteEmbeddedLanguage/FrameworkParametersCompletionProviderTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
using Microsoft.AspNetCore.Analyzers.RouteEmbeddedLanguage.Infrastructure;
5+
using Microsoft.AspNetCore.Testing;
56
using Microsoft.CodeAnalysis.Completion;
67

78
namespace Microsoft.AspNetCore.Analyzers.RouteEmbeddedLanguage;
89

10+
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/49126")]
911
public partial class FrameworkParametersCompletionProviderTests
1012
{
1113
private TestDiagnosticAnalyzerRunner Runner { get; } = new(new RoutePatternAnalyzer());

src/Framework/AspNetCoreAnalyzers/test/RouteEmbeddedLanguage/RoutePatternCompletionProviderTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33

44
using System.Text;
55
using Microsoft.AspNetCore.Analyzers.RouteEmbeddedLanguage.Infrastructure;
6+
using Microsoft.AspNetCore.Testing;
67
using Microsoft.CodeAnalysis.Completion;
78
using Microsoft.CodeAnalysis.Text;
89

910
namespace Microsoft.AspNetCore.Analyzers.RouteEmbeddedLanguage;
1011

12+
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/49126")]
1113
public partial class RoutePatternCompletionProviderTests
1214
{
1315
private TestDiagnosticAnalyzerRunner Runner { get; } = new(new RoutePatternAnalyzer());

src/Http/Http.Extensions/gen/Microsoft.AspNetCore.Http.RequestDelegateGenerator.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<Compile Include="$(SharedSourceRoot)RoslynUtils\SyntaxTreeExtensions.cs" LinkBase="Shared" />
3131
<Compile Include="$(SharedSourceRoot)RoslynUtils\ParsabilityHelper.cs" LinkBase="Shared" />
3232
<Compile Include="$(SharedSourceRoot)RoslynUtils\CodeWriter.cs" LinkBase="Shared" />
33+
<Compile Include="$(SharedSourceRoot)RoslynUtils\IncrementalValuesProviderExtensions.cs" LinkBase="Shared" />
3334
<Compile Include="$(SharedSourceRoot)Diagnostics\AnalyzerDebug.cs" LinkBase="Shared" />
3435
</ItemGroup>
3536

0 commit comments

Comments
 (0)