Skip to content

Commit 51a8200

Browse files
Update dependencies from dotnet/roslyn (dotnet#59182)
* Update dependencies from dotnet/roslyn * Update SourceBuildPrebuiltBaseline.xml * Fixup * Address new Roslyn warnings * Rename InterceptorsPreviewNamespaces to InterceptorsNamespaces --------- Co-authored-by: Safia Abdalla <[email protected]>
1 parent 35c31ca commit 51a8200

File tree

5 files changed

+40
-21
lines changed

5 files changed

+40
-21
lines changed

.globalconfig

+17
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,20 @@ dotnet_diagnostic.CA1310.severity = error
1212

1313
# TODO: remove this - https://github.com/dotnet/aspnetcore/issues/47912
1414
dotnet_diagnostic.EnableGenerateDocumentationFile.severity = none
15+
16+
# Referencing types that are defined in M.CA.Workspaces is not appropriate
17+
# for analyzers or source generators that might be invoked from a command
18+
# line build because editor-specific types in M.CA.Workspaces are not
19+
# available in the command line. By default, Roslyn enables RS1038
20+
# which does a strict check and throws if a reference to M.CA.Workspaces
21+
# is included in the assembly. Here, we opt for a more relaxed check that
22+
# validates if M.CA.Workspace type references are included in the specific
23+
# Roslyn components that might be loaded in command line builds. We do this
24+
# because we ship editor-specific components, like the routing completion
25+
# providers, in the shared framework and want to avoid the analyzers warning
26+
# on the M.CA.Workspaces reference required for their components even though
27+
# they are never loaded in command line builds. Note: the "relaxed" check that is
28+
# enabled here will actually examine the types loaded by each individually analyzer
29+
# to see if they are from a Workspaces assembly so it will take longer than the
30+
# greedier (and stricter) check for references overall.
31+
roslyn_correctness.assembly_reference_validation = relaxed

eng/Version.Details.xml

+10-10
Original file line numberDiff line numberDiff line change
@@ -345,26 +345,26 @@
345345
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
346346
</Dependency>
347347
<!-- Not updated automatically -->
348-
<Dependency Name="Microsoft.CodeAnalysis.Common" Version="4.11.0-1.24218.5">
348+
<Dependency Name="Microsoft.CodeAnalysis.Common" Version="4.13.0-3.24576.5">
349349
<Uri>https://github.com/dotnet/roslyn</Uri>
350-
<Sha>afa1eb6821f62183651ab017b2f5c3fbeb934904</Sha>
350+
<Sha>175121c035a6f057b9388737bb9b8755fb6dba7e</Sha>
351351
</Dependency>
352-
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.AspNetCore" Version="4.11.0-1.24218.5">
352+
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.AspNetCore" Version="4.13.0-3.24576.5">
353353
<Uri>https://github.com/dotnet/roslyn</Uri>
354-
<Sha>afa1eb6821f62183651ab017b2f5c3fbeb934904</Sha>
354+
<Sha>175121c035a6f057b9388737bb9b8755fb6dba7e</Sha>
355355
</Dependency>
356-
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.11.0-1.24218.5">
356+
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.13.0-3.24576.5">
357357
<Uri>https://github.com/dotnet/roslyn</Uri>
358-
<Sha>afa1eb6821f62183651ab017b2f5c3fbeb934904</Sha>
358+
<Sha>175121c035a6f057b9388737bb9b8755fb6dba7e</Sha>
359359
</Dependency>
360-
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.11.0-1.24218.5">
360+
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.13.0-3.24576.5">
361361
<Uri>https://github.com/dotnet/roslyn</Uri>
362-
<Sha>afa1eb6821f62183651ab017b2f5c3fbeb934904</Sha>
362+
<Sha>175121c035a6f057b9388737bb9b8755fb6dba7e</Sha>
363363
</Dependency>
364364
<!-- Intermediate is necessary for source build. -->
365-
<Dependency Name="Microsoft.SourceBuild.Intermediate.roslyn" Version="4.11.0-1.24218.5">
365+
<Dependency Name="Microsoft.SourceBuild.Intermediate.roslyn" Version="4.13.0-3.24576.5">
366366
<Uri>https://github.com/dotnet/roslyn</Uri>
367-
<Sha>afa1eb6821f62183651ab017b2f5c3fbeb934904</Sha>
367+
<Sha>175121c035a6f057b9388737bb9b8755fb6dba7e</Sha>
368368
<SourceBuild RepoName="roslyn" ManagedOnly="true" />
369369
</Dependency>
370370
<Dependency Name="System.Composition" Version="10.0.0-alpha.1.24576.1">

eng/Versions.props

+10-10
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,11 @@
154154
<MicrosoftEntityFrameworkCoreVersion>10.0.0-alpha.1.24576.4</MicrosoftEntityFrameworkCoreVersion>
155155
<MicrosoftEntityFrameworkCoreDesignVersion>10.0.0-alpha.1.24576.4</MicrosoftEntityFrameworkCoreDesignVersion>
156156
<!-- Packages from dotnet/roslyn -->
157-
<MicrosoftCodeAnalysisCommonVersion>4.11.0-1.24218.5</MicrosoftCodeAnalysisCommonVersion>
158-
<MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>4.11.0-1.24218.5</MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>
159-
<MicrosoftCodeAnalysisCSharpVersion>4.11.0-1.24218.5</MicrosoftCodeAnalysisCSharpVersion>
160-
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.11.0-1.24218.5</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
161-
<MicrosoftSourceBuildIntermediateroslynVersion>4.11.0-1.24218.5</MicrosoftSourceBuildIntermediateroslynVersion>
157+
<MicrosoftCodeAnalysisCommonVersion>4.13.0-3.24576.5</MicrosoftCodeAnalysisCommonVersion>
158+
<MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>4.13.0-3.24576.5</MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>
159+
<MicrosoftCodeAnalysisCSharpVersion>4.13.0-3.24576.5</MicrosoftCodeAnalysisCSharpVersion>
160+
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.13.0-3.24576.5</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
161+
<MicrosoftSourceBuildIntermediateroslynVersion>4.13.0-3.24576.5</MicrosoftSourceBuildIntermediateroslynVersion>
162162
<!-- Packages from NuGet/Nuget.client -->
163163
<!-- If you update these versions, make sure to also update https://github.com/dotnet/aspnetcore/blob/main/eng/SourceBuildPrebuiltBaseline.xml -->
164164
<NuGetPackagingVersion>6.2.4</NuGetPackagingVersion>
@@ -251,11 +251,11 @@
251251
<Analyzer_MicrosoftCodeAnalysisCSharpWorkspacesVersion>3.3.1</Analyzer_MicrosoftCodeAnalysisCSharpWorkspacesVersion>
252252
<!-- Pin the version of the M.CA dependencies that we utilize with a cutom version property $(MicrosoftCodeAnalysisVersion_LatestVS) to avoid automatically
253253
consuming the newest version of the packages when using the $(MicrosoftCodeAnalysisCSharpVersion) properties in source-build. -->
254-
<MicrosoftCodeAnalysisVersion_LatestVS>4.11.0-1.24218.5</MicrosoftCodeAnalysisVersion_LatestVS>
255-
<MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>4.11.0-1.24218.5</MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>
256-
<MicrosoftCodeAnalysisCommonVersion>4.11.0-1.24218.5</MicrosoftCodeAnalysisCommonVersion>
257-
<MicrosoftCodeAnalysisCSharpVersion>4.11.0-1.24218.5</MicrosoftCodeAnalysisCSharpVersion>
258-
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.11.0-1.24218.5</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
254+
<MicrosoftCodeAnalysisVersion_LatestVS>4.13.0-3.24576.5</MicrosoftCodeAnalysisVersion_LatestVS>
255+
<MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>4.13.0-3.24576.5</MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>
256+
<MicrosoftCodeAnalysisCommonVersion>4.13.0-3.24576.5</MicrosoftCodeAnalysisCommonVersion>
257+
<MicrosoftCodeAnalysisCSharpVersion>4.13.0-3.24576.5</MicrosoftCodeAnalysisCSharpVersion>
258+
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.13.0-3.24576.5</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
259259
<MicrosoftCodeAnalysisPublicApiAnalyzersVersion>3.3.3</MicrosoftCodeAnalysisPublicApiAnalyzersVersion>
260260
<MicrosoftCodeAnalysisCSharpAnalyzerTestingXUnitVersion>1.1.2-beta1.24121.1</MicrosoftCodeAnalysisCSharpAnalyzerTestingXUnitVersion>
261261
<MicrosoftCodeAnalysisCSharpCodeFixTestingXUnitVersion>1.1.2-beta1.24121.1</MicrosoftCodeAnalysisCSharpCodeFixTestingXUnitVersion>

src/Framework/AspNetCoreAnalyzers/test/Infrastructure/WellKnownTypesTests.cs

+2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ private static Stream GetInMemoryAssemblyStreamForCode(string code, string assem
8282
return stream;
8383
}
8484

85+
#pragma warning disable RS1041 // Compiler extensions should be implemented in assemblies targeting netstandard2.0
8586
[DiagnosticAnalyzer(LanguageNames.CSharp)]
87+
#pragma warning restore RS1041 // Compiler extensions should be implemented in assemblies targeting netstandard2.0
8688
private class TestAnalyzer : DiagnosticAnalyzer
8789
{
8890
internal static readonly DiagnosticDescriptor SuccessDescriptor = new(

src/Http/Http.Extensions/test/RequestDelegateGenerator/RequestDelegateCreationTestBase.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public abstract class RequestDelegateCreationTestBase : LoggedTest
3535

3636
protected abstract bool IsGeneratorEnabled { get; }
3737

38-
internal static readonly CSharpParseOptions ParseOptions = new CSharpParseOptions(LanguageVersion.Preview).WithFeatures(new[] { new KeyValuePair<string, string>("InterceptorsPreviewNamespaces", "Microsoft.AspNetCore.Http.Generated") });
38+
internal static readonly CSharpParseOptions ParseOptions = new CSharpParseOptions(LanguageVersion.Preview).WithFeatures(new[] { new KeyValuePair<string, string>("InterceptorsNamespaces", "Microsoft.AspNetCore.Http.Generated") });
3939
private static readonly Project _baseProject = CreateProject();
4040
private static readonly string _interceptsLocationAttributeRegex = @"\[global::System\.Runtime\.CompilerServices\.InterceptsLocationAttribute\(\d+, "".*""\)\]";
4141

0 commit comments

Comments
 (0)