mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 21:07:21 +00:00
Moved the build to the .NET SDK v10.0.403 (#1156)
This commit is contained in:
1 parent
c0a75f39ac
commit
0375318b1b
10 files changed
+143
-153
No files matched your search
@@ -20,10 +20,12 @@
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<!--
|
||||
Never above the Roslyn of the .NET SDK we build with (see metadata.txt): the 10.0.1xx SDKs ship
|
||||
Roslyn 5.0. Built against a newer one, the compiler skips these analyzers with CS9057. Raise
|
||||
both only together with the SDK feature band, with SourceGeneratedMappings, and with the Tests
|
||||
project.
|
||||
Never above the Roslyn of the oldest .NET SDK which may build AI Studio: the 10.0.1xx SDKs ship
|
||||
Roslyn 5.0. Built against a newer one, the compiler skips these analyzers with CS9057. The
|
||||
pipeline builds with the SDK in metadata.txt, a 10.0.4xx with Roslyn 5.9, but the .NET packages
|
||||
of Linux distributions bring a 10.0.1xx, and so may the computer of a contributor. Raise both
|
||||
only together with SourceGeneratedMappings and the Tests project, and only once a 10.0.1xx SDK
|
||||
no longer has to build AI Studio.
|
||||
-->
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="5.0.0" />
|
||||
|
||||
+2
-8
@@ -13,10 +13,7 @@ namespace SourceCodeRules.StyleAnalyzers;
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// AI Studio declares its extension members in extension blocks, one per receiver, so that all members of a
|
||||
/// receiver read alike and extension properties can join them. A method with a params parameter stays a
|
||||
/// classic one for now: for a member of an extension block, the compiler of the .NET 10.0.1xx SDK warns about
|
||||
/// every argument passed one by one to a params parameter (CS8620, dotnet/roslyn#80024). Drop that exception
|
||||
/// once the SDK in metadata.txt carries the fix.
|
||||
/// receiver read alike and extension properties can join them.
|
||||
/// </remarks>
|
||||
#pragma warning disable RS1038
|
||||
[DiagnosticAnalyzer(LanguageNames.CSharp)]
|
||||
@@ -29,7 +26,7 @@ public sealed class ClassicExtensionMethodAnalyzer : DiagnosticAnalyzer
|
||||
|
||||
private const string MESSAGE_FORMAT = "Declare '{0}' as a member of an extension block for its receiver instead of with a this parameter";
|
||||
|
||||
private const string DESCRIPTION = "AI Studio declares its extension members in extension blocks, one per receiver. Only a method with a params parameter stays a classic extension method, until the SDK fixes dotnet/roslyn#80024.";
|
||||
private const string DESCRIPTION = "AI Studio declares its extension members in extension blocks, one per receiver.";
|
||||
|
||||
private const string CATEGORY = "Style";
|
||||
|
||||
@@ -55,9 +52,6 @@ public sealed class ClassicExtensionMethodAnalyzer : DiagnosticAnalyzer
|
||||
if (thisKeyword.IsKind(SyntaxKind.None))
|
||||
return;
|
||||
|
||||
if (parameters.Any(parameter => parameter.Modifiers.Any(SyntaxKind.ParamsKeyword)))
|
||||
return;
|
||||
|
||||
context.ReportDiagnostic(Diagnostic.Create(RULE, thisKeyword.GetLocation(), method.Identifier.Text));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user